Documentation
¶
Index ¶
- type Addition
- type File
- type Files
- type Host
- type Object
- type OnedriveAPP
- func (d *OnedriveAPP) Config() driver.Config
- func (d *OnedriveAPP) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *OnedriveAPP) Drop(ctx context.Context) error
- func (d *OnedriveAPP) GetAddition() driver.Additional
- func (d *OnedriveAPP) GetFile(path string) (*File, error)
- func (d *OnedriveAPP) GetMetaUrl(auth bool, path string) string
- func (d *OnedriveAPP) GetRoot(ctx context.Context) (model.Obj, error)
- func (d *OnedriveAPP) Init(ctx context.Context) error
- func (d *OnedriveAPP) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *OnedriveAPP) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *OnedriveAPP) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *OnedriveAPP) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *OnedriveAPP) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *OnedriveAPP) Remove(ctx context.Context, obj model.Obj) error
- func (d *OnedriveAPP) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- func (d *OnedriveAPP) 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"`
TenantID string `json:"tenant_id"`
Email string `json:"email"`
ChunkSize int64 `json:"chunk_size" type:"number" default:"5"`
CustomHost string `json:"custom_host" help:"Custom host for onedrive download link"`
}
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 OnedriveAPP ¶
type OnedriveAPP struct {
model.Storage
Addition
AccessToken string
// contains filtered or unexported fields
}
func (*OnedriveAPP) Config ¶
func (d *OnedriveAPP) Config() driver.Config
func (*OnedriveAPP) GetAddition ¶
func (d *OnedriveAPP) GetAddition() driver.Additional
func (*OnedriveAPP) GetMetaUrl ¶
func (d *OnedriveAPP) GetMetaUrl(auth bool, path string) string
func (*OnedriveAPP) Put ¶
func (d *OnedriveAPP) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error
func (*OnedriveAPP) Request ¶
func (d *OnedriveAPP) Request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.