1Panel/backend/app/dto/response/file.go
9cc4ec49ef
feat: 文件管理编辑文件增加左侧目录树 (#5594)
Refs: #3624

#### What this PR does / why we need it?

#### Summary of your change

#### Please indicate you've done the following:

- [ ] Made sure tests are passing and test coverage is added if needed.
- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
2024-06-28 06:16:57 +00:00

48 lines
904 B
Go

package response
import (
"github.com/1Panel-dev/1Panel/backend/utils/files"
)
type FileInfo struct {
files.FileInfo
}
type UploadInfo struct {
Name string `json:"name"`
Size int `json:"size"`
CreatedAt string `json:"createdAt"`
}
type FileTree struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"isDir"`
Extension string `json:"extension"`
Children []FileTree `json:"children"`
}
type DirSizeRes struct {
Size float64 `json:"size" validate:"required"`
}
type FileProcessKeys struct {
Keys []string `json:"keys"`
}
type FileWgetRes struct {
Key string `json:"key"`
}
type FileLineContent struct {
Content string `json:"content"`
End bool `json:"end"`
Path string `json:"path"`
Total int `json:"total"`
}
type FileExist struct {
Exist bool `json:"exist"`
}