1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-20 00:39:17 +08:00
1Panel/backend/app/dto/file.go

66 lines
994 B
Go
Raw Normal View History

2022-08-24 11:10:50 +08:00
package dto
2022-08-25 17:54:52 +08:00
import (
"github.com/1Panel-dev/1Panel/utils/files"
)
2022-08-24 11:10:50 +08:00
type FileOption struct {
files.FileOption
}
type FileInfo struct {
files.FileInfo
}
2022-08-24 17:34:21 +08:00
type FileTree struct {
ID string `json:"id"`
2022-08-24 17:34:21 +08:00
Name string `json:"name"`
Path string `json:"path"`
Children []FileTree `json:"children"`
}
2022-08-25 17:54:52 +08:00
type FileCreate struct {
Path string
Content string
IsDir bool
Mode int64
IsLink bool
IsSymlink bool
LinkPath string
2022-08-25 17:54:52 +08:00
}
2022-08-25 18:48:03 +08:00
type FileDelete struct {
Path string
IsDir bool
}
2022-08-30 17:59:59 +08:00
type FileCompress struct {
Files []string
Dst string
Type string
Name string
Replace bool
}
2022-08-31 13:59:02 +08:00
type FileDeCompress struct {
Dst string
Type string
Path string
}
2022-09-01 19:02:33 +08:00
type FileEdit struct {
Path string
Content string
}
2022-09-03 22:22:40 +08:00
type FileRename struct {
OldName string
NewName string
}
2022-09-05 16:25:26 +08:00
type FileDownload struct {
Url string `json:"url" validate:"required"`
Path string `json:"path" validate:"required"`
Name string `json:"name" validate:"required"`
}