Documentation
¶
Index ¶
- Constants
- func Batch(requests []batchRequest, token Token) error
- func Delete(files []File, token Token) error
- func Download(file File, parallel int, dir string, token Token) error
- func Move(tofileid string, files []File, token Token) error
- func Rename(name, fileid string, token Token) error
- func ShareCancel(shareidlist []string, token Token) error
- func Trash(files []File, token Token) error
- func UploadFile(path, fileid string, token Token) (id string, err error)
- func UploadImage(path string, token Token) error
- type DownloadUrl
- type File
- type ShareInfo
- type State
- type Token
- type UploadFolderInfo
- func Create(checkmode, name, filetype, fileid string, token Token, ...) (upload UploadFolderInfo, err error)
- func CreateDirectory(name, fileid string, token Token) (upload UploadFolderInfo, err error)
- func CreateWithFolder(checkmode, name, filetype, fileid string, token Token, ...) (upload UploadFolderInfo, err error)
Constants ¶
View Source
const ( TYPE_FILE = "file" TYPE_FOLDER = "folder" )
Variables ¶
This section is empty.
Functions ¶
func ShareCancel ¶
func UploadImage ¶
Types ¶
type DownloadUrl ¶
type DownloadUrl struct { Url string `json:"url"` InternalUrl string `json:"internal_url"` Expiration time.Time `json:"expiration"` Size int `json:"size"` ContentHash string `json:"content_hash"` }
func GetDownloadUrl ¶
func GetDownloadUrl(file File, token Token) (du DownloadUrl, err error)
type File ¶
type File struct { DriveID string `json:"drive_id"` DomainID string `json:"domain_id"` EncryptMode string `json:"encrypt_mode"` FileID string `json:"file_id"` ParentID string `json:"parent_file_id"` Type string `json:"type"` Name string `json:"name"` Size int `json:"size"` Category string `json:"category"` Hash string `json:"content_hash"` HashName string `json:"content_hash_name"` Url string `json:"download_url"` Thumbnail string `json:"thumbnail"` Extension string `json:"file_extension"` }
type Token ¶
type UploadFolderInfo ¶
type UploadFolderInfo struct { DeviceID string `json:"device_id"` DomainID string `json:"domain_id"` FileID string `json:"file_id"` ParentID string `json:"parent_file_id"` Type string `json:"type"` Name string `json:"file_name"` UploadID string `json:"upload_id"` RapidUpload bool `json:"rapid_upload"` PartInfoList []struct { InternalUploadUrl string `json:"internal_upload_url"` PartNumber int `json:"part_number"` UploadUrl string `json:"upload_url"` } `json:"part_info_list"` }
func CreateDirectory ¶
func CreateDirectory(name, fileid string, token Token) (upload UploadFolderInfo, err error)
func CreateWithFolder ¶
Click to show internal directories.
Click to hide internal directories.