Documentation
¶
Index ¶
- type Client
- func (c *Client) DeleteByPath(ctx context.Context, relPath string) error
- func (c *Client) DownloadTo(ctx context.Context, itemID, destPath string) error
- func (c *Client) GetItemByPath(ctx context.Context, relPath string) (*DriveItem, error)
- func (c *Client) ListChildren(ctx context.Context, relPath string) ([]DriveItem, error)
- func (c *Client) RootDelta(ctx context.Context, deltaLink string) (*DeltaResponse, error)
- func (c *Client) UploadLarge(ctx context.Context, relPath, localPath, ifMatch string, chunkMB, parallel int) (*DriveItem, error)
- func (c *Client) UploadSmall(ctx context.Context, relPath, localPath, ifMatch string) (*DriveItem, error)
- type DeltaGoneError
- type DeltaResponse
- type DriveItem
- type DriveItemFile
- type DriveItemFolder
- type DriveItemHashes
- type DriveItemParentReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) DeleteByPath ¶
func (*Client) DownloadTo ¶
func (*Client) GetItemByPath ¶
func (*Client) ListChildren ¶ added in v0.9.3
func (*Client) UploadLarge ¶
type DeltaGoneError ¶ added in v0.7.28
type DeltaGoneError struct{}
DeltaGoneError is returned when the OneDrive delta link has expired (HTTP 410 Gone). The caller must discard the stored delta link and restart from a full sync.
func (*DeltaGoneError) Error ¶ added in v0.7.28
func (e *DeltaGoneError) Error() string
type DeltaResponse ¶
type DriveItem ¶
type DriveItem struct {
ID string `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
ETag string `json:"eTag"`
CTag string `json:"cTag"`
LastModifiedDateTime string `json:"lastModifiedDateTime"`
File *DriveItemFile `json:"file"`
Folder *DriveItemFolder `json:"folder"`
ParentReference *DriveItemParentReference `json:"parentReference"`
Deleted map[string]any `json:"deleted"`
}
type DriveItemFile ¶ added in v0.9.3
type DriveItemFile struct {
MimeType string `json:"mimeType"`
Hashes *DriveItemHashes `json:"hashes"`
}
type DriveItemFolder ¶ added in v0.9.3
type DriveItemFolder struct {
ChildCount int `json:"childCount"`
}
type DriveItemHashes ¶ added in v0.9.3
type DriveItemHashes struct {
Sha256Hash string `json:"sha256Hash"`
}
type DriveItemParentReference ¶ added in v0.9.3
type DriveItemParentReference struct {
Path string `json:"path"`
}
Click to show internal directories.
Click to hide internal directories.