Documentation ¶
Overview ¶
Package api provides types used by the Teldrive API.
Index ¶
- type CopyFile
- type CopyMoveFileRequest
- type CreateDirRequest
- type CreateFileRequest
- type CreateFolderRequest
- type DeleteFolderRequest
- type DirMove
- type Download
- type Error
- type FileInfo
- type FilePart
- type MetadataRequestOptions
- type MoveFileRequest
- type Part
- type PartFile
- type ReadMetadataResponse
- type RemoveFileRequest
- type Session
- type Token
- type UpdateFileInformation
- type UpdateResponse
- type UploadFile
- 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 string `json:"destination_fld_id"` Action string `json:"action"` }
CopyMoveFileRequest is used for moving/copying a file
type CreateDirRequest ¶
type CreateDirRequest struct {
Path string `json:"path"`
}
type CreateFileRequest ¶
type CreateFileRequest struct { Name string `json:"name"` Type string `json:"type"` Path string `json:"path"` MimeType string `json:"mimeType"` Size int64 `json:"size"` ChannelID int64 `json:"channelId"` Encrypted bool `json:"encrypted"` Parts []FilePart `json:"parts"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` }
type CreateFolderRequest ¶
type CreateFolderRequest struct { Name string `json:"name"` Type string `json:"type"` Path string `json:"path"` }
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 FileInfo ¶
type FileInfo struct { Id string `json:"id"` Name string `json:"name"` MimeType string `json:"mimeType"` Size int64 `json:"size"` ParentId string `json:"parentId"` Type string `json:"type"` ModTime string `json:"updatedAt"` }
FileInfo represents a file when listing folder contents
type MetadataRequestOptions ¶
type MetadataRequestOptions struct { PerPage int64 SearchField string Search string NextPageToken string }
MetadataRequestOptions represents all the options when listing folder contents
type MoveFileRequest ¶
type MoveFileRequest struct { Files []string `json:"files"` Destination string `json:"destination"` }
MoveFolderRequest is used for moving a folder
type ReadMetadataResponse ¶
type ReadMetadataResponse struct { Files []FileInfo `json:"results"` NextPageToken string `json:"nextPageToken,omitempty"` }
ReadMetadataResponse is the response when listing folder contents
type RemoveFileRequest ¶
type RemoveFileRequest struct {
Files []string `json:"files"`
}
RemoveFileRequest is used for deleting a file
type Token ¶
type Token struct {
Token string `json:"token"`
}
Token represents the authentication token
type UpdateFileInformation ¶
type UpdateFileInformation struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` Parts []FilePart `json:"parts,omitempty"` Size int64 `json:"size,omitempty"` }
UpdateFileInformation is used for renaming a file
type UpdateResponse ¶
type UpdateResponse struct { Message string `json:"message,omitempty"` Status bool `json:"status"` }
UpdateResponse is a generic response to various action on files (rename/copy/move)
type UploadFile ¶
type UploadFile struct {
Parts []PartFile `json:"parts,omitempty"`
}