Documentation ¶
Index ¶
- func NewNoRedirectCLient() *http.Client
- type Addition
- type FolderResp
- type GraphQLNEWRequest
- type GraphQLRequest
- type Item
- 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) 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 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. }
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) 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.