Documentation ¶
Index ¶
- type Addition
- type File
- type Files
- type Host
- type Object
- type Onedrive
- func (d *Onedrive) Config() driver.Config
- func (d *Onedrive) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Onedrive) Drop(ctx context.Context) error
- func (d *Onedrive) GetAddition() driver.Additional
- func (d *Onedrive) GetFile(path string) (*File, error)
- func (d *Onedrive) GetMetaUrl(auth bool, path string) string
- func (d *Onedrive) Init(ctx context.Context) error
- func (d *Onedrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Onedrive) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Onedrive) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *Onedrive) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Onedrive) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *Onedrive) Remove(ctx context.Context, obj model.Obj) error
- func (d *Onedrive) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- func (d *Onedrive) Request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error)
- type RespErr
- type TokenErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct { driver.RootPath Region string `json:"region" type:"select" required:"true" options:"global,cn,us,de" default:"global"` ClientID string `json:"client_id" required:"true"` ClientSecret string `json:"client_secret" required:"true"` RedirectUri string `json:"redirect_uri" required:"true" default:"https://alist.nn.ci/tool/onedrive/callback"` RefreshToken string `json:"refresh_token" required:"true"` SiteId string `json:"site_id"` ChunkSize int64 `json:"chunk_size" type:"number" default:"5"` }
type File ¶
type File struct { Id string `json:"id"` Name string `json:"name"` Size int64 `json:"size"` LastModifiedDateTime time.Time `json:"lastModifiedDateTime"` Url string `json:"@microsoft.graph.downloadUrl"` File *struct { MimeType string `json:"mimeType"` } `json:"file"` Thumbnails []struct { Medium struct { Url string `json:"url"` } `json:"medium"` } `json:"thumbnails"` ParentReference struct { DriveId string `json:"driveId"` } `json:"parentReference"` }
type Onedrive ¶
func (*Onedrive) GetAddition ¶
func (d *Onedrive) GetAddition() driver.Additional
func (*Onedrive) Put ¶
func (d *Onedrive) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error
Click to show internal directories.
Click to hide internal directories.