Documentation
¶
Index ¶
- Constants
- func EncodePath(path string, all ...bool) string
- type About
- type Addition
- type Host
- type Info
- type Onedrive
- func (d *Onedrive) Config() driver.Config
- func (d *Onedrive) Drop(ctx context.Context) error
- func (d *Onedrive) GetAddition() driver.Additional
- func (d *Onedrive) GetInfo(ctx context.Context) (string, string, string, error)
- func (d *Onedrive) GetMetaUrl(auth bool, path string) string
- func (d *Onedrive) GetSpaceSize(ctx context.Context) (used string, total string, err error)
- func (d *Onedrive) GetUserInfo(ctx context.Context) (string, error)
- func (d *Onedrive) Init(ctx context.Context) error
- func (d *Onedrive) Request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error)
- type RespErr
- type TokenErr
Constants ¶
View Source
const ICONURL = "./img/driver/OneDrive.svg"
Variables ¶
This section is empty.
Functions ¶
func EncodePath ¶
Types ¶
type Addition ¶
type Addition struct {
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:""`
RefreshToken string `json:"refresh_token" required:"true"`
SiteId string `json:"site_id"`
ChunkSize int64 `json:"chunk_size" type:"number" default:"5"`
RootFolderID string `json:"root_folder_id"`
AuthUrl string `json:"auth_url" type:"string" default:""`
Icon string `json:"icon" type:"string" default:""`
Code string `json:"code" type:"string" help:"code from auth_url" omit:"true"`
}
type Info ¶
type Info struct {
LastModifiedBy struct {
Application struct {
DisplayName string `json:"displayName"`
ID string `json:"id"`
} `json:"application"`
Device struct {
ID string `json:"id"`
} `json:"device"`
User struct {
DisplayName string `json:"displayName"`
ID string `json:"id"`
} `json:"user"`
} `json:"lastModifiedBy"`
ParentReference struct {
DriveID string `json:"driveId"`
DriveType string `json:"driveType"`
} `json:"parentReference"`
}
type Onedrive ¶
func (*Onedrive) GetAddition ¶
func (d *Onedrive) GetAddition() driver.Additional
func (*Onedrive) GetSpaceSize ¶
Click to show internal directories.
Click to hide internal directories.