Documentation ¶
Index ¶
- type Addition
- type Error
- type File
- type Files
- type GoogleDrive
- func (d *GoogleDrive) Config() driver.Config
- func (d *GoogleDrive) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *GoogleDrive) Drop(ctx context.Context) error
- func (d *GoogleDrive) GetAddition() driver.Additional
- func (d *GoogleDrive) Init(ctx context.Context) error
- func (d *GoogleDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *GoogleDrive) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *GoogleDrive) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *GoogleDrive) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *GoogleDrive) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *GoogleDrive) Remove(ctx context.Context, obj model.Obj) error
- func (d *GoogleDrive) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- type TokenError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct { driver.RootID RefreshToken string `json:"refresh_token" required:"true"` OrderBy string `json:"order_by" type:"string" help:"such as: folder,name,modifiedTime"` OrderDirection string `json:"order_direction" type:"select" options:"asc,desc"` ClientID string `json:"client_id" required:"true" default:"202264815644.apps.googleusercontent.com"` ClientSecret string `json:"client_secret" required:"true" default:"X4Z3ca8xfWDb1Voo-F9a7ZxJ"` ChunkSize int64 `json:"chunk_size" type:"number" default:"5" help:"chunk size while uploading (unit: MB)"` }
type File ¶
type File struct { Id string `json:"id"` Name string `json:"name"` MimeType string `json:"mimeType"` ModifiedTime time.Time `json:"modifiedTime"` CreatedTime time.Time `json:"createdTime"` Size string `json:"size"` ThumbnailLink string `json:"thumbnailLink"` ShortcutDetails struct { TargetId string `json:"targetId"` TargetMimeType string `json:"targetMimeType"` } `json:"shortcutDetails"` MD5Checksum string `json:"md5Checksum"` SHA1Checksum string `json:"sha1Checksum"` SHA256Checksum string `json:"sha256Checksum"` }
type GoogleDrive ¶
type GoogleDrive struct { model.Storage Addition AccessToken string ServiceAccountFile int ServiceAccountFileList []string }
func (*GoogleDrive) Config ¶
func (d *GoogleDrive) Config() driver.Config
func (*GoogleDrive) GetAddition ¶
func (d *GoogleDrive) GetAddition() driver.Additional
func (*GoogleDrive) Put ¶
func (d *GoogleDrive) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error
type TokenError ¶
Click to show internal directories.
Click to hide internal directories.