Documentation
¶
Index ¶
- type Addition
- type CopyManager
- type CopyTask
- type ErrResp
- type FilePart
- type ListResp
- type Object
- type ShareObj
- type Teldrive
- func (d *Teldrive) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, ...) ([]model.Obj, error)
- func (d *Teldrive) Config() driver.Config
- func (d *Teldrive) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Teldrive) Drop(ctx context.Context) error
- func (d *Teldrive) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)
- func (d *Teldrive) GetAddition() driver.Additional
- func (d *Teldrive) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
- func (d *Teldrive) Init(ctx context.Context) error
- func (d *Teldrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Teldrive) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Teldrive) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)
- func (d *Teldrive) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *Teldrive) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Teldrive) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, ...) error
- func (d *Teldrive) Remove(ctx context.Context, obj model.Obj) error
- func (d *Teldrive) 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 {
driver.RootPath
Address string `json:"url" required:"true"`
Cookie string `json:"cookie" type:"string" required:"true" help:"access_token=xxx"`
ChunkSize int64 `json:"chunk_size" type:"number" default:"10" help:"Chunk size in MiB"`
UploadConcurrency int64 `json:"upload_concurrency" type:"number" default:"4" help:"Concurrency upload requests"`
}
type CopyManager ¶
type CopyManager struct {
TaskChan chan CopyTask
Sem *semaphore.Weighted
G *errgroup.Group
Ctx context.Context
// contains filtered or unexported fields
}
func NewCopyManager ¶
func NewCopyManager(ctx context.Context, concurrent int, d *Teldrive) *CopyManager
type Object ¶
type Object struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
MimeType string `json:"mimeType"`
Category string `json:"category,omitempty"`
ParentId string `json:"parentId"`
Size int64 `json:"size"`
Encrypted bool `json:"encrypted"`
UpdatedAt time.Time `json:"updatedAt"`
}
type Teldrive ¶
func (*Teldrive) ArchiveDecompress ¶
func (*Teldrive) GetAddition ¶
func (d *Teldrive) GetAddition() driver.Additional
func (*Teldrive) GetArchiveMeta ¶
func (d *Teldrive) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
func (*Teldrive) ListArchive ¶
Click to show internal directories.
Click to hide internal directories.