Documentation ¶
Overview ¶
Package api provides types used by the Yandex API.
Index ¶
- type AsyncInfo
- type AsyncStatus
- type CustomPropertyResponse
- type DiskInfo
- type ErrorResponse
- type ResourceInfoRequestOptions
- type ResourceInfoResponse
- type ResourceListResponse
- type SortMode
- func (m *SortMode) ByCreated() *SortMode
- func (m *SortMode) ByModified() *SortMode
- func (m *SortMode) ByName() *SortMode
- func (m *SortMode) ByPath() *SortMode
- func (m *SortMode) BySize() *SortMode
- func (m *SortMode) Default() *SortMode
- func (m *SortMode) Reverse() *SortMode
- func (m *SortMode) String() string
- func (m *SortMode) UnmarshalJSON(value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncInfo ¶
type AsyncInfo struct { HRef string `json:"href"` Method string `json:"method"` Templated bool `json:"templated"` }
AsyncInfo struct is returned by the API for various async operations.
type AsyncStatus ¶
type AsyncStatus struct {
Status string `json:"status"`
}
AsyncStatus is returned when requesting the status of an async operations. Possible values in-progress, success, failure
type CustomPropertyResponse ¶
type CustomPropertyResponse struct {
CustomProperties map[string]interface{} `json:"custom_properties"`
}
CustomPropertyResponse struct we send and is returned by the API for CustomProperty request.
type DiskInfo ¶
type DiskInfo struct { TotalSpace int64 `json:"total_space"` UsedSpace int64 `json:"used_space"` TrashSize int64 `json:"trash_size"` }
DiskInfo contains disk metadata
type ErrorResponse ¶
type ErrorResponse struct { ErrorName string `json:"error"` Description string `json:"description"` Message string `json:"message"` StatusCode int `json:""` }
ErrorResponse represents erroneous API response. Implements go's built in `error`.
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type ResourceInfoRequestOptions ¶
type ResourceInfoRequestOptions struct { SortMode *SortMode Limit uint64 Offset uint64 Fields []string }
ResourceInfoRequestOptions struct
type ResourceInfoResponse ¶
type ResourceInfoResponse struct { PublicKey string `json:"public_key"` Name string `json:"name"` Created string `json:"created"` CustomProperties map[string]interface{} `json:"custom_properties"` Preview string `json:"preview"` PublicURL string `json:"public_url"` OriginPath string `json:"origin_path"` Modified string `json:"modified"` Path string `json:"path"` Md5 string `json:"md5"` ResourceType string `json:"type"` MimeType string `json:"mime_type"` Size int64 `json:"size"` Embedded *ResourceListResponse `json:"_embedded"` }
ResourceInfoResponse struct is returned by the API for metadata requests.
type ResourceListResponse ¶
type ResourceListResponse struct { Sort *SortMode `json:"sort"` PublicKey string `json:"public_key"` Items []ResourceInfoResponse `json:"items"` Path string `json:"path"` Limit *uint64 `json:"limit"` Offset *uint64 `json:"offset"` Total *uint64 `json:"total"` }
ResourceListResponse struct
type SortMode ¶
type SortMode struct {
// contains filtered or unexported fields
}
SortMode struct - sort mode
func (*SortMode) UnmarshalJSON ¶
UnmarshalJSON sort mode