Documentation
¶
Index ¶
- Constants
- type CleanTrashParams
- type Client
- func (c *Client) CleanTrash(ctx context.Context, params CleanTrashParams) (*Link, error)
- func (c *Client) CopyResource(ctx context.Context, params CopyResourceParams) (*Link, error)
- func (c *Client) CreateDirectory(ctx context.Context, params CreateDirectoryParams) (*Link, error)
- func (c *Client) DeleteResource(ctx context.Context, params DeleteResourceParams) (*Link, error)
- func (c *Client) DiskMetaInfo(ctx context.Context, params DiskMetaInfoParams) (*Disk, error)
- func (c *Client) Download(ctx context.Context, downloadURL string, w io.Writer) error
- func (c *Client) DownloadFileLink(ctx context.Context, params DownloadFileLinkParams) (*Link, error)
- func (c *Client) DownloadPublicResourceLink(ctx context.Context, params DownloadPublicResourceLinkParams) (*Link, error)
- func (c *Client) ListFiles(ctx context.Context, params ListFilesParams) (*FileResourceList, error)
- func (c *Client) ListFilesLastUploaded(ctx context.Context, params ListFilesLastUploadedParams) (*LastUploadedResourceList, error)
- func (c *Client) ListPublicResources(ctx context.Context, params ListPublicResourcesParams) (*PublicResourceList, error)
- func (c *Client) MoveResource(ctx context.Context, params MoveResourceParams) (*Link, error)
- func (c *Client) OperationStatus(ctx context.Context, operationID string) (*Operation, error)
- func (c *Client) PublicResourceMetaInfo(ctx context.Context, params PublicResourceMetaInfoParams) (*PublicResource, error)
- func (c *Client) PublishResource(ctx context.Context, params PublishResourceParams) (*Link, error)
- func (c *Client) ResourceMetaInfo(ctx context.Context, params ResourceMetaInfoParams) (*Resource, error)
- func (c *Client) RestoreResource(ctx context.Context, params RestoreResourceParams) (*Link, error)
- func (c *Client) SaveToDisk(ctx context.Context, params SaveToDiskParams) (*Link, error)
- func (c *Client) TrashContent(ctx context.Context, params TrashContentParams) (*TrashResource, error)
- func (c *Client) UnpublishResource(ctx context.Context, params UnpublishResourceParams) (*Link, error)
- func (c *Client) UpdateResourceUserData(ctx context.Context, params UpdateResourceUserDataParams) (*Resource, error)
- func (c *Client) Upload(ctx context.Context, uploadURL string, r io.Reader) error
- func (c *Client) UploadFileByURL(ctx context.Context, params UploadFileByURLParams) (*Link, error)
- func (c *Client) UploadFileLink(ctx context.Context, params UploadFileLinkParams) (*ResourceUploadLink, error)
- type CommentIDs
- type CopyResourceParams
- type CreateDirectoryParams
- type DeleteResourceParams
- type Disk
- type DiskMetaInfoParams
- type DownloadFileLinkParams
- type DownloadPublicResourceLinkParams
- type EmbeddedPublicResourceList
- type Error
- type Exif
- type FileResourceList
- type LastUploadedResourceList
- type Link
- type ListFilesLastUploadedParams
- type ListFilesParams
- type ListPublicResourcesParams
- type MoveResourceParams
- type Operation
- type Opt
- type Preview
- type PublicResource
- type PublicResourceList
- type PublicResourceMetaInfoParams
- type PublishResourceParams
- type Resource
- type ResourceList
- type ResourceMetaInfoParams
- type ResourceUploadLink
- type RestoreResourceParams
- type SaveToDiskParams
- type ShareInfo
- type Status
- type SystemFolders
- type TrashContentParams
- type TrashResource
- type TrashResourceList
- type UnpublishResourceParams
- type UpdateResourceUserDataParams
- type UploadFileByURLParams
- type UploadFileLinkParams
- type User
- type UserPublicInformation
Constants ¶
View Source
const DefaultHost = "cloud-api.yandex.net"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanTrashParams ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CleanTrash ¶
func (*Client) CopyResource ¶
func (*Client) CreateDirectory ¶
func (*Client) DeleteResource ¶
func (*Client) DiskMetaInfo ¶
func (*Client) DownloadFileLink ¶
func (*Client) DownloadPublicResourceLink ¶
func (*Client) ListFiles ¶
func (c *Client) ListFiles(ctx context.Context, params ListFilesParams) (*FileResourceList, error)
func (*Client) ListFilesLastUploaded ¶
func (c *Client) ListFilesLastUploaded(ctx context.Context, params ListFilesLastUploadedParams) (*LastUploadedResourceList, error)
func (*Client) ListPublicResources ¶
func (c *Client) ListPublicResources(ctx context.Context, params ListPublicResourcesParams) (*PublicResourceList, error)
func (*Client) MoveResource ¶
func (*Client) OperationStatus ¶
func (*Client) PublicResourceMetaInfo ¶
func (c *Client) PublicResourceMetaInfo(ctx context.Context, params PublicResourceMetaInfoParams) (*PublicResource, error)
func (*Client) PublishResource ¶
func (*Client) ResourceMetaInfo ¶
func (*Client) RestoreResource ¶
func (*Client) SaveToDisk ¶
func (*Client) TrashContent ¶
func (c *Client) TrashContent(ctx context.Context, params TrashContentParams) (*TrashResource, error)
func (*Client) UnpublishResource ¶
func (*Client) UpdateResourceUserData ¶
func (*Client) UploadFileByURL ¶
func (*Client) UploadFileLink ¶
func (c *Client) UploadFileLink(ctx context.Context, params UploadFileLinkParams) (*ResourceUploadLink, error)
type CommentIDs ¶
type CopyResourceParams ¶
type CreateDirectoryParams ¶
type DeleteResourceParams ¶
type Disk ¶
type Disk struct {
PaidMaxFileSize int `json:"paid_max_file_size,omitempty"`
MaxFileSize int `json:"max_file_size,omitempty"`
TotalSpace int `json:"total_space,omitempty"`
TrashSize int `json:"trash_size,omitempty"`
UsedSpace int `json:"used_space,omitempty"`
IsPaid bool `json:"is_paid,omitempty"`
RegTime *time.Time `json:"reg_time,omitempty"`
SystemFolders *SystemFolders `json:"system_folders,omitempty"`
User *User `json:"user,omitempty"`
UnlimitedAutouploadEnabled bool `json:"unlimited_autoupload_enabled,omitempty"`
Revision int `json:"revision,omitempty"`
}
type DiskMetaInfoParams ¶
type DiskMetaInfoParams struct {
Fields []string `param:"fields"`
}
type DownloadFileLinkParams ¶
type EmbeddedPublicResourceList ¶
type EmbeddedPublicResourceList struct {
Sort string `json:"sort,omitempty"`
PublicKey string `json:"public_key,omitempty"`
Items []PublicResource `json:"items,omitempty"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
Path string `json:"path,omitempty"`
Total int `json:"total,omitempty"`
}
type Error ¶
type FileResourceList ¶
type ListFilesParams ¶
type MoveResourceParams ¶
type PublicResource ¶
type PublicResource struct {
AntivirusStatus string `json:"antivirus_status,omitempty"`
ViewsCount int `json:"views_count,omitempty"`
ResourceID string `json:"resource_id,omitempty"`
File string `json:"file,omitempty"`
Owner *UserPublicInformation `json:"owner,omitempty"`
Size int `json:"size,omitempty"`
PhotosliceTime *time.Time `json:"photoslice_time,omitempty"`
Embedded *EmbeddedPublicResourceList `json:"_embedded,omitempty"`
Exif *Exif `json:"exif,omitempty"`
MediaType string `json:"media_type,omitempty"`
Preview string `json:"preview,omitempty"`
Type string `json:"type,omitempty"`
MimeType string `json:"mime_type,omitempty"`
Revision int `json:"revision,omitempty"`
PublicURL string `json:"public_url,omitempty"`
Path string `json:"path,omitempty"`
MD5 string `json:"md5,omitempty"`
PublicKey string `json:"public_key,omitempty"`
SHA256 string `json:"sha256,omitempty"`
Name string `json:"name,omitempty"`
Created *time.Time `json:"created,omitempty"`
Sizes []Preview `json:"sizes,omitempty"`
Modified *time.Time `json:"modified,omitempty"`
CommentIDs *CommentIDs `json:"comment_ids,omitempty"`
}
type PublicResourceList ¶
type PublicResourceMetaInfoParams ¶
type PublicResourceMetaInfoParams struct {
PublicKey string `param:"public_key,required"`
Fields []string `param:"fields"`
Limit int `param:"limit"`
Offset int `param:"offset"`
Path string `param:"path"`
PreviewCrop bool `param:"preview_crop"`
PreviewSize string `param:"preview_size"`
Sort string `param:"sort"`
}
type PublishResourceParams ¶
type Resource ¶
type Resource struct {
AntivirusStatus string `json:"antivirus_status,omitempty"`
ResourceID string `json:"resource_id,omitempty"`
File string `json:"file,omitempty"`
Size int `json:"size,omitempty"`
PhotosliceTime *time.Time `json:"photoslice_time,omitempty"`
Embedded *ResourceList `json:"_embedded,omitempty"`
Exif *Exif `json:"exif,omitempty"`
CustomProperties map[string]any `json:"custom_properties,omitempty"`
MediaType string `json:"media_type,omitempty"`
Preview string `json:"preview,omitempty"`
Type string `json:"type,omitempty"`
MimeType string `json:"mime_type,omitempty"`
Revision int `json:"revision,omitempty"`
PublicURL string `json:"public_url,omitempty"`
Path string `json:"path,omitempty"`
MD5 string `json:"md5,omitempty"`
PublicKey string `json:"public_key,omitempty"`
Sha256 string `json:"sha256,omitempty"`
Name string `json:"name,omitempty"`
Created *time.Time `json:"created,omitempty"`
Sizes []Preview `json:"sizes,omitempty"`
Modified *time.Time `json:"modified,omitempty"`
CommentIDs *CommentIDs `json:"comment_ids,omitempty"`
}
type ResourceList ¶
type ResourceMetaInfoParams ¶
type ResourceUploadLink ¶
type RestoreResourceParams ¶
type SaveToDiskParams ¶
type SystemFolders ¶
type SystemFolders struct {
Odnoklassniki string `json:"odnoklassniki,omitempty"`
Google string `json:"google,omitempty"`
Instagram string `json:"instagram,omitempty"`
Vkontakte string `json:"vkontakte,omitempty"`
Attach string `json:"attach,omitempty"`
Mailru string `json:"mailru,omitempty"`
Downloads string `json:"downloads,omitempty"`
Applications string `json:"applications,omitempty"`
Facebook string `json:"facebook,omitempty"`
Social string `json:"social,omitempty"`
Messenger string `json:"messenger,omitempty"`
Calendar string `json:"calendar,omitempty"`
Photostream string `json:"photostream,omitempty"`
Screenshots string `json:"screenshots,omitempty"`
Scans string `json:"scans,omitempty"`
}
type TrashContentParams ¶
type TrashResource ¶
type TrashResource struct {
AntivirusStatus string `json:"antivirus_status,omitempty"`
ResourceID string `json:"resource_id,omitempty"`
File string `json:"file,omitempty"`
Size int `json:"size,omitempty"`
PhotosliceTime *time.Time `json:"photoslice_time,omitempty"`
Embedded *ResourceList `json:"_embedded,omitempty"`
Exif *Exif `json:"exif,omitempty"`
CustomProperties map[string]any `json:"custom_properties,omitempty"`
OriginPath string `json:"origin_path,omitempty"`
MediaType string `json:"media_type,omitempty"`
Preview string `json:"preview,omitempty"`
Type string `json:"type,omitempty"`
MimeType string `json:"mime_type,omitempty"`
Revision int `json:"revision,omitempty"`
Deleted *time.Time `json:"deleted,omitempty"`
PublicURL string `json:"public_url,omitempty"`
Path string `json:"path,omitempty"`
MD5 string `json:"md5,omitempty"`
PublicKey string `json:"public_key,omitempty"`
Sha256 string `json:"sha256,omitempty"`
Name string `json:"name,omitempty"`
Created *time.Time `json:"created,omitempty"`
Sizes []Preview `json:"sizes,omitempty"`
Modified *time.Time `json:"modified,omitempty"`
CommentIDs *CommentIDs `json:"comment_ids,omitempty"`
}
type TrashResourceList ¶
type UnpublishResourceParams ¶
type UploadFileByURLParams ¶
type UploadFileLinkParams ¶
type UserPublicInformation ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.