Documentation ¶
Index ¶
- type Addition
- type DownResp
- type ErrResp
- type File
- type FilesResp
- type TokenErrResp
- type UploadResp
- type YandexDisk
- func (d *YandexDisk) Config() driver.Config
- func (d *YandexDisk) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *YandexDisk) Drop(ctx context.Context) error
- func (d *YandexDisk) GetAddition() driver.Additional
- func (d *YandexDisk) Init(ctx context.Context) error
- func (d *YandexDisk) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *YandexDisk) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *YandexDisk) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *YandexDisk) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *YandexDisk) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *YandexDisk) Remove(ctx context.Context, obj model.Obj) error
- func (d *YandexDisk) Rename(ctx context.Context, srcObj model.Obj, newName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct { RefreshToken string `json:"refresh_token" required:"true"` OrderBy string `json:"order_by" type:"select" options:"name,path,created,modified,size" default:"name"` OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"` driver.RootPath ClientID string `json:"client_id" required:"true" default:"a78d5a69054042fa936f6c77f9a0ae8b"` ClientSecret string `json:"client_secret" required:"true" default:"9c119bbb04b346d2a52aa64401936b2b"` }
type File ¶
type File struct { //AntivirusStatus string `json:"antivirus_status"` Size int64 `json:"size"` //CommentIds struct { // PrivateResource string `json:"private_resource"` // PublicResource string `json:"public_resource"` //} `json:"comment_ids"` Name string `json:"name"` //Exif struct { // DateTime time.Time `json:"date_time"` //} `json:"exif"` //Created time.Time `json:"created"` //ResourceId string `json:"resource_id"` Modified time.Time `json:"modified"` //MimeType string `json:"mime_type"` File string `json:"file"` //MediaType string `json:"media_type"` Preview string `json:"preview"` Path string `json:"path"` //Sha256 string `json:"sha256"` Type string `json:"type"` }
type FilesResp ¶
type FilesResp struct { Embedded struct { Sort string `json:"sort"` Items []File `json:"items"` Limit int `json:"limit"` Offset int `json:"offset"` Path string `json:"path"` Total int `json:"total"` } `json:"_embedded"` Name string `json:"name"` Exif struct { } `json:"exif"` ResourceId string `json:"resource_id"` Created time.Time `json:"created"` Modified time.Time `json:"modified"` Path string `json:"path"` CommentIds struct { } `json:"comment_ids"` Type string `json:"type"` Revision int64 `json:"revision"` }
type TokenErrResp ¶
type UploadResp ¶
type YandexDisk ¶
func (*YandexDisk) Config ¶
func (d *YandexDisk) Config() driver.Config
func (*YandexDisk) GetAddition ¶
func (d *YandexDisk) GetAddition() driver.Additional
func (*YandexDisk) Put ¶
func (d *YandexDisk) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error
Click to show internal directories.
Click to hide internal directories.