github.com/10XDev/rclone@v1.52.3-0.20200626220027-16af9ab76b2a/backend/fichier/structs.go (about) 1 package fichier 2 3 // ListFolderRequest is the request structure of the corresponding request 4 type ListFolderRequest struct { 5 FolderID int `json:"folder_id"` 6 } 7 8 // ListFilesRequest is the request structure of the corresponding request 9 type ListFilesRequest struct { 10 FolderID int `json:"folder_id"` 11 } 12 13 // DownloadRequest is the request structure of the corresponding request 14 type DownloadRequest struct { 15 URL string `json:"url"` 16 Single int `json:"single"` 17 } 18 19 // RemoveFolderRequest is the request structure of the corresponding request 20 type RemoveFolderRequest struct { 21 FolderID int `json:"folder_id"` 22 } 23 24 // RemoveFileRequest is the request structure of the corresponding request 25 type RemoveFileRequest struct { 26 Files []RmFile `json:"files"` 27 } 28 29 // RmFile is the request structure of the corresponding request 30 type RmFile struct { 31 URL string `json:"url"` 32 } 33 34 // GenericOKResponse is the response structure of the corresponding request 35 type GenericOKResponse struct { 36 Status string `json:"status"` 37 Message string `json:"message"` 38 } 39 40 // MakeFolderRequest is the request structure of the corresponding request 41 type MakeFolderRequest struct { 42 Name string `json:"name"` 43 FolderID int `json:"folder_id"` 44 } 45 46 // MakeFolderResponse is the response structure of the corresponding request 47 type MakeFolderResponse struct { 48 Name string `json:"name"` 49 FolderID int `json:"folder_id"` 50 } 51 52 // GetUploadNodeResponse is the response structure of the corresponding request 53 type GetUploadNodeResponse struct { 54 ID string `json:"id"` 55 URL string `json:"url"` 56 } 57 58 // GetTokenResponse is the response structure of the corresponding request 59 type GetTokenResponse struct { 60 URL string `json:"url"` 61 Status string `json:"Status"` 62 Message string `json:"Message"` 63 } 64 65 // SharedFolderResponse is the response structure of the corresponding request 66 type SharedFolderResponse []SharedFile 67 68 // SharedFile is the structure how 1Fichier returns a shared File 69 type SharedFile struct { 70 Filename string `json:"filename"` 71 Link string `json:"link"` 72 Size int64 `json:"size"` 73 } 74 75 // EndFileUploadResponse is the response structure of the corresponding request 76 type EndFileUploadResponse struct { 77 Incoming int `json:"incoming"` 78 Links []struct { 79 Download string `json:"download"` 80 Filename string `json:"filename"` 81 Remove string `json:"remove"` 82 Size string `json:"size"` 83 Whirlpool string `json:"whirlpool"` 84 } `json:"links"` 85 } 86 87 // File is the structure how 1Fichier returns a File 88 type File struct { 89 ACL int `json:"acl"` 90 CDN int `json:"cdn"` 91 Checksum string `json:"checksum"` 92 ContentType string `json:"content-type"` 93 Date string `json:"date"` 94 Filename string `json:"filename"` 95 Pass int `json:"pass"` 96 Size int64 `json:"size"` 97 URL string `json:"url"` 98 } 99 100 // FilesList is the structure how 1Fichier returns a list of files 101 type FilesList struct { 102 Items []File `json:"items"` 103 Status string `json:"Status"` 104 } 105 106 // Folder is the structure how 1Fichier returns a Folder 107 type Folder struct { 108 CreateDate string `json:"create_date"` 109 ID int `json:"id"` 110 Name string `json:"name"` 111 Pass int `json:"pass"` 112 } 113 114 // FoldersList is the structure how 1Fichier returns a list of Folders 115 type FoldersList struct { 116 FolderID int `json:"folder_id"` 117 Name string `json:"name"` 118 Status string `json:"Status"` 119 SubFolders []Folder `json:"sub_folders"` 120 }