Documentation ¶
Overview ¶
Package api provides types used by the Quatrix API.
Index ¶
- Constants
- type CreateDirParams
- type DeleteParams
- type DownloadLinkResponse
- type File
- type FileCopyMoveOneParams
- type FileInfo
- type FileInfoParams
- type FileModifyParams
- type IDList
- type JSONTime
- type ProfileInfo
- type SetMTimeParams
- type UploadFinalizeResponse
- type UploadLinkParams
- type UploadLinkResponse
Constants ¶
const OverwriteMode = "overwrite"
OverwriteMode is a conflict resolve mode during copy or move. Files with conflicting names will be overwritten
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateDirParams ¶
type CreateDirParams struct { Target string `json:"target,omitempty"` Name string `json:"name"` Resolve bool `json:"resolve"` }
CreateDirParams is the request to create a directory
type DeleteParams ¶
type DeleteParams struct { IDs []string `json:"ids"` DeletePermanently bool `json:"delete_permanently"` }
DeleteParams is the request to delete object
type DownloadLinkResponse ¶
type DownloadLinkResponse struct {
ID string `json:"id"`
}
DownloadLinkResponse is the response to download-link request
type File ¶
type File struct { ID string `json:"id"` Created JSONTime `json:"created"` Modified JSONTime `json:"modified"` Name string `json:"name"` ParentID string `json:"parent_id"` Size int64 `json:"size"` ModifiedMS JSONTime `json:"modified_ms"` Type string `json:"type"` Operations int `json:"operations"` SubType string `json:"sub_type"` Content []File `json:"content"` }
File represent metadata about object in Quatrix (file or directory)
func (*File) IsProjectFolder ¶
IsProjectFolder returns true if object is a project folder false otherwise
type FileCopyMoveOneParams ¶
type FileCopyMoveOneParams struct { ID string `json:"file_id"` Target string `json:"target_id"` Name string `json:"name"` MTime JSONTime `json:"mtime"` Resolve bool `json:"resolve"` ResolveMode string `json:"resolve_mode"` }
FileCopyMoveOneParams is the request to do server-side copy and move can be used for file or directory
type FileInfo ¶
type FileInfo struct { FileID string `json:"file_id"` ParentID string `json:"parent_id"` Src string `json:"src"` Type string `json:"type"` }
FileInfo is the response to get object's (file or directory) info
type FileInfoParams ¶
type FileInfoParams struct { ParentID string `json:"parent_id,omitempty"` Path string `json:"path"` }
FileInfoParams is the request to get object's (file or directory) info
type FileModifyParams ¶
FileModifyParams is the request to get modify file link
type IDList ¶
type IDList struct {
IDs []string `json:"ids"`
}
IDList is a general object that contains list of ids
type JSONTime ¶
JSONTime provides methods to marshal/unmarshal time.Time as Unix time
func (JSONTime) MarshalJSON ¶
MarshalJSON returns time representation in Unix time
func (*JSONTime) UnmarshalJSON ¶
UnmarshalJSON sets time from Unix time representation
type ProfileInfo ¶
type ProfileInfo struct { UserUsed int64 `json:"user_used"` UserLimit int64 `json:"user_limit"` AccUsed int64 `json:"acc_used"` AccLimit int64 `json:"acc_limit"` }
ProfileInfo is a profile info about quota
type SetMTimeParams ¶
SetMTimeParams is the request to set modification time for object
type UploadFinalizeResponse ¶
type UploadFinalizeResponse struct { FileID string `json:"id"` ParentID string `json:"parent_id"` Modified int64 `json:"modified"` FileSize int64 `json:"size"` }
UploadFinalizeResponse is the response to finalize file method
type UploadLinkParams ¶
type UploadLinkParams struct { Name string `json:"name"` ParentID string `json:"parent_id"` Resolve bool `json:"resolve"` }
UploadLinkParams is the request to get upload-link