Documentation ¶
Overview ¶
* @Author: a624669980@163.com a624669980@163.com * @Date: 2022-12-13 11:05:05 * @LastEditors: a624669980@163.com a624669980@163.com * @LastEditTime: 2022-12-13 11:05:13 * @FilePath: /drive/internal/driver/config.go * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Author: a624669980@163.com a624669980@163.com * @Date: 2022-12-13 11:05:47 * @LastEditors: a624669980@163.com a624669980@163.com * @LastEditTime: 2022-12-13 11:05:54 * @FilePath: /drive/internal/driver/item.go * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
Index ¶
- type Additional
- type Config
- type Copy
- type CopyResult
- type Driver
- type Getter
- type IRootId
- type IRootPath
- type Info
- type Item
- type Meta
- type Mkdir
- type MkdirResult
- type Move
- type MoveResult
- type Other
- type Progress
- type Put
- type PutResult
- type Reader
- type Remove
- type Rename
- type RenameResult
- type RootID
- type RootPath
- type Select
- type UpdateProgress
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Additional ¶
type Additional interface{}
type Config ¶
type Config struct { Name string `json:"name"` LocalSort bool `json:"local_sort"` OnlyLocal bool `json:"only_local"` OnlyProxy bool `json:"only_proxy"` NoCache bool `json:"no_cache"` NoUpload bool `json:"no_upload"` NeedMs bool `json:"need_ms"` // if need get message from user, such as validate code DefaultRoot string `json:"default_root"` CheckStatus bool }
type CopyResult ¶
type Meta ¶
type Meta interface { Config() Config // GetStorage just get raw storage, no need to implement, because model.Storage have implemented GetStorage() *model.StorageA SetStorage(model.StorageA) // GetAddition Additional is used for unmarshal of JSON, so need return pointer GetAddition() Additional // Init If already initialized, drop first Init(ctx context.Context) error Drop(ctx context.Context) error }
type MkdirResult ¶
type MoveResult ¶
type Progress ¶
func NewProgress ¶
func NewProgress(total int64, up UpdateProgress) *Progress
type Put ¶
type Put interface {
Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up UpdateProgress) error
}
type PutResult ¶
type PutResult interface {
Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up UpdateProgress) (model.Obj, error)
}
type RenameResult ¶
type RootPath ¶
type RootPath struct {
RootFolderPath string `json:"root_folder_path"`
}
func (RootPath) GetRootPath ¶
func (*RootPath) SetRootPath ¶
type UpdateProgress ¶
type UpdateProgress func(percentage int)