Documentation
¶
Index ¶
- func NewNoRedirectCLient() *http.Client
- type Addition
- type FolderResp
- type GraphQLNEWRequest
- type GraphQLRequest
- type Item
- type Object
- type OnedriveSharelink
- func (d *OnedriveSharelink) Config() driver.Config
- func (d *OnedriveSharelink) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *OnedriveSharelink) Drop(ctx context.Context) error
- func (d *OnedriveSharelink) GetAddition() driver.Additional
- func (d *OnedriveSharelink) GetDetails(ctx context.Context) (*model.StorageDetails, error)
- func (d *OnedriveSharelink) GetDirectUploadInfo(ctx context.Context, tool string, dstDir model.Obj, fileName string, ...) (any, error)
- func (d *OnedriveSharelink) GetDirectUploadTools() []string
- func (d *OnedriveSharelink) Init(ctx context.Context) error
- func (d *OnedriveSharelink) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *OnedriveSharelink) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *OnedriveSharelink) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *OnedriveSharelink) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *OnedriveSharelink) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *OnedriveSharelink) Remove(ctx context.Context, obj model.Obj) error
- func (d *OnedriveSharelink) Rename(ctx context.Context, srcObj model.Obj, newName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNoRedirectCLient ¶
NewNoRedirectClient creates an HTTP client that doesn't follow redirects
Types ¶
type Addition ¶
type Addition struct {
driver.RootPath
DisableDiskUsage bool `json:"disable_disk_usage" default:"false"`
EnableDirectUpload bool `json:"enable_direct_upload" default:"false" help:"Allow uploading directly to OneDrive without going through OpenList"`
Headers http.Header
HeaderTime int64
DriveURL string
DriveAccessToken string
DriveTokenTime int64
// contains filtered or unexported fields
}
type FolderResp ¶
type FolderResp struct {
// Data holds the nested structure of the response.
Data struct {
Legacy struct {
RenderListData struct {
ListData struct {
Items []Item `json:"Row"` // Items contains the list of items in the folder.
} `json:"ListData"`
} `json:"renderListDataAsStream"`
} `json:"legacy"`
} `json:"data"`
}
FolderResp represents the structure of the folder response from the OneDrive API.
type GraphQLNEWRequest ¶
type GraphQLNEWRequest struct {
ListData struct {
NextHref string `json:"NextHref"` // NextHref is the link to the next set of data.
Row []Item `json:"Row"` // Row contains the list of items.
} `json:"ListData"`
}
GraphQLNEWRequest represents the structure of a new GraphQL request.
type GraphQLRequest ¶
type GraphQLRequest struct {
Data struct {
Legacy struct {
RenderListDataAsStream struct {
ListData struct {
NextHref string `json:"NextHref"` // NextHref is the link to the next set of data.
Row []Item `json:"Row"` // Row contains the list of items.
} `json:"ListData"`
ViewMetadata struct {
ListViewXml string `json:"ListViewXml"` // ListViewXml contains the XML of the list view.
} `json:"ViewMetadata"`
} `json:"renderListDataAsStream"`
} `json:"legacy"`
} `json:"data"`
}
GraphQLRequest represents the structure of a GraphQL request.
type Item ¶
type Item struct {
ObjType string `json:"FSObjType"` // ObjType indicates if the item is a file or folder.
Name string `json:"FileLeafRef"` // Name is the name of the item.
ModifiedTime time.Time `json:"Modified."` // ModifiedTime is the last modified time of the item.
Size string `json:"File_x0020_Size"` // Size is the size of the item in string format.
Id string `json:"UniqueId"` // Id is the unique identifier of the item.
SPItemURL string `json:".spItemUrl"` // SPItemURL points to the SharePoint item metadata API.
ContentDownloadURL string `json:"@content.downloadUrl"` // ContentDownloadURL is a temporary cookie-free download URL.
}
Item represents an individual item in the folder.
type OnedriveSharelink ¶
type OnedriveSharelink struct {
// contains filtered or unexported fields
}
func (*OnedriveSharelink) Config ¶
func (d *OnedriveSharelink) Config() driver.Config
func (*OnedriveSharelink) GetAddition ¶
func (d *OnedriveSharelink) GetAddition() driver.Additional
func (*OnedriveSharelink) GetDetails ¶ added in v4.2.3
func (d *OnedriveSharelink) GetDetails(ctx context.Context) (*model.StorageDetails, error)
func (*OnedriveSharelink) GetDirectUploadInfo ¶ added in v4.2.3
func (*OnedriveSharelink) GetDirectUploadTools ¶ added in v4.2.3
func (d *OnedriveSharelink) GetDirectUploadTools() []string
func (*OnedriveSharelink) Put ¶
func (d *OnedriveSharelink) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error
Click to show internal directories.
Click to hide internal directories.