forked from kernel164/gofe
-
Notifications
You must be signed in to change notification settings - Fork 3
/
models.go
48 lines (41 loc) · 1.74 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package models
type GenericReq struct {
Action string `json:"action" binding:"Required"`
OnlyFoldreferers bool `json:"onlyFolders"` // list
Path string `json:"path"` // ALL
Items []string `json:"items"` // API v1.5+ List of Items for Copy/Move/Remove/changePermissions/compress/downloadMultiple
Item string `json:"item"` // API v1.5+ Rename
NewPath string `json:"newPath"` // move/rename, copy
NewItemPath string `json:newItemPath` // API v1.5+ Reanme Action
Content string `json:"content"` // edit
SingleFilename string `json:"singleFilename"` // API v1.5+ Copy
Perms string `json:"perms"` // changepermissions
PermsCode string `json:"permsCode"` // changepermissions
Recursive bool `json:"recursive"` // changepermissions
Destination string `json:"destination"` // compress, extract
SourceFile string `json:"sourceFile"` // extract
Preview bool `json:"preview"` // download
}
type Item struct {
string
}
type ListDirResp struct {
Result []ListDirEntry `json:"result" binding:"Required"`
}
type ListDirEntry struct {
Name string `json:"name" binding:"Required"`
Rights string `json:"rights" binding:"Required"`
Size string `json:"size" binding:"Required"`
Date string `json:"date" binding:"Required"`
Type string `json:"type" binding:"Required"`
}
type GenericResp struct {
Result GenericRespBody `json:"result" binding:"Required"`
}
type GenericRespBody struct {
Success bool `json:"success"`
Error string `json:"error"`
}
type GetContentResp struct {
Result string `json:"result" binding:"Required"`
}