Documentation ¶
Overview ¶
Package api provides types used by the Uptobox API.
Index ¶
- type CopyMoveFileRequest
- type CreateFolderRequest
- type DeleteFolderRequest
- type Download
- type Error
- type FileInfo
- type FolderEntry
- type FolderInfo
- type MetadataRequestOptions
- type MoveFolderRequest
- type ReadMetadataResponse
- type RemoveFileRequest
- type RenameFolderRequest
- type Token
- type UpdateFileInformation
- type UpdateResponse
- type UploadInfo
- type UploadResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CopyMoveFileRequest ¶
type CopyMoveFileRequest struct { Token string `json:"token"` FileCodes string `json:"file_codes"` DestinationFolderID uint64 `json:"destination_fld_id"` Action string `json:"action"` }
CopyMoveFileRequest is used for moving/copying a file
type CreateFolderRequest ¶
type CreateFolderRequest struct { Token string `json:"token"` Path string `json:"path"` Name string `json:"name"` }
CreateFolderRequest is used for creating a folder
type DeleteFolderRequest ¶
DeleteFolderRequest is used for deleting a folder
type Download ¶
type Download struct { StatusCode int `json:"statusCode"` Message string `json:"message"` Data struct { DownloadLink string `json:"dlLink"` } `json:"data"` }
Download is the response when requesting a download link
type Error ¶
type Error struct { Success bool `json:"success,omitempty"` StatusCode int `json:"statusCode,omitempty"` Message string `json:"message,omitempty"` Data string `json:"data,omitempty"` }
Error contains the error code and message returned by the API
type FileInfo ¶
type FileInfo struct { Name string `json:"file_name"` Description string `json:"file_descr"` Created string `json:"file_created"` Size int64 `json:"file_size"` Downloads uint64 `json:"file_downloads"` Code string `json:"file_code"` Password string `json:"file_password"` Public int `json:"file_public"` LastDownload string `json:"file_last_download"` ID uint64 `json:"id"` }
FileInfo represents a file when listing folder contents
type FolderEntry ¶
type FolderEntry struct { FolderID uint64 `json:"fld_id"` Description string `json:"fld_descr"` Password string `json:"fld_password"` FullPath string `json:"fullPath"` Path string `json:"fld_name"` Name string `json:"name"` Hash string `json:"hash"` }
FolderEntry represents a Uptobox subfolder when listing folder contents
type FolderInfo ¶
type FolderInfo struct { FolderID uint64 `json:"fld_id"` Hash string `json:"hash"` FileCount uint64 `json:"fileCount"` TotalFileSize int64 `json:"totalFileSize"` }
FolderInfo represents the current folder when listing folder contents
type MetadataRequestOptions ¶
MetadataRequestOptions represents all the options when listing folder contents
type MoveFolderRequest ¶
type MoveFolderRequest struct { Token string `json:"token"` FolderID uint64 `json:"fld_id"` DestinationFolderID uint64 `json:"destination_fld_id"` Action string `json:"action"` }
MoveFolderRequest is used for moving a folder
type ReadMetadataResponse ¶
type ReadMetadataResponse struct { StatusCode int `json:"statusCode"` Message string `json:"message"` Data struct { CurrentFolder FolderInfo `json:"currentFolder"` Folders []FolderEntry `json:"folders"` Files []FileInfo `json:"files"` PageCount int `json:"pageCount"` TotalFileCount int `json:"totalFileCount"` TotalFileSize int64 `json:"totalFileSize"` } `json:"data"` }
ReadMetadataResponse is the response when listing folder contents
type RemoveFileRequest ¶
RemoveFileRequest is used for deleting a file
type RenameFolderRequest ¶
type RenameFolderRequest struct { Token string `json:"token"` FolderID uint64 `json:"fld_id"` NewName string `json:"new_name"` }
RenameFolderRequest is used for renaming a folder
type Token ¶
type Token struct {
Token string `json:"token"`
}
Token represents the authentication token
type UpdateFileInformation ¶
type UpdateFileInformation struct { Token string `json:"token"` FileCode string `json:"file_code"` NewName string `json:"new_name,omitempty"` Description string `json:"description,omitempty"` Password string `json:"password,omitempty"` Public string `json:"public,omitempty"` }
UpdateFileInformation is used for renaming a file
type UpdateResponse ¶
UpdateResponse is a generic response to various action on files (rename/copy/move)