Documentation ¶
Index ¶
- Constants
- func FileRespReadCloser(pl string) io.ReadCloser
- func FileRespWithExtensions(pl string, extData *details.ExtensionData) io.ReadCloser
- type BackupHandler
- func (h BackupHandler[T]) AugmentItemInfo(details.ItemInfo, idname.Provider, *custom.DriveItem, int64, *path.Builder) details.ItemInfo
- func (h BackupHandler[T]) CanonicalPath(pb *path.Builder, tID string) (path.Path, error)
- func (h BackupHandler[T]) EnumerateDriveItemsDelta(ctx context.Context, driveID, prevDeltaLink string, cc api.CallConfig) pagers.NextPageResulter[models.DriveItemable]
- func (h BackupHandler[T]) FormatDisplayPath(_ string, pb *path.Builder) string
- func (h *BackupHandler[T]) Get(context.Context, string, map[string]string, bool) (*http.Response, error)
- func (h BackupHandler[T]) GetItem(ctx context.Context, _, _ string) (models.DriveItemable, error)
- func (h BackupHandler[T]) GetItemPermission(ctx context.Context, _, _ string) (models.PermissionCollectionResponseable, error)
- func (h BackupHandler[T]) GetRootFolder(context.Context, string) (models.DriveItemable, error)
- func (h BackupHandler[T]) IncludesDir(dir string) bool
- func (h BackupHandler[T]) IsAllPass() bool
- func (h BackupHandler[T]) MetadataPathPrefix(tID string) (path.Path, error)
- func (h BackupHandler[T]) NewDrivePager(string, []string) pagers.NonDeltaHandler[models.Driveable]
- func (h BackupHandler[T]) NewLocationIDer(driveID string, elems ...string) details.LocationIDer
- func (h BackupHandler[T]) PathPrefix(tID, driveID string) (path.Path, error)
- func (h BackupHandler[T]) ServiceCat() (path.ServiceType, path.CategoryType)
- type DeltaDrive
- type DeltaDriveEnumerator
- type DeltaQuery
- type EnumerateDriveItemsDelta
- func (en EnumerateDriveItemsDelta) DrivePager() *apiMock.Pager[models.Driveable]
- func (en EnumerateDriveItemsDelta) Drives() []*DeltaDrive
- func (en EnumerateDriveItemsDelta) EnumerateDriveItemsDelta(_ context.Context, driveID, _ string, _ api.CallConfig) pagers.NextPageResulter[models.DriveItemable]
- type FetchItemByName
- type GetsItem
- type GetsItemPermission
- type NextPage
- type RestoreHandler
- func (h *RestoreHandler) AugmentItemInfo(details.ItemInfo, idname.Provider, *custom.DriveItem, int64, *path.Builder) details.ItemInfo
- func (h *RestoreHandler) DeleteItem(_ context.Context, _, itemID string) error
- func (h *RestoreHandler) DeleteItemPermission(context.Context, string, string, string) error
- func (h *RestoreHandler) GetFolderByName(context.Context, string, string, string) (models.DriveItemable, error)
- func (h *RestoreHandler) GetItemsInContainerByCollisionKey(context.Context, string, string) (map[string]api.DriveItemIDType, error)
- func (h *RestoreHandler) GetRootFolder(context.Context, string) (models.DriveItemable, error)
- func (h RestoreHandler) NewDrivePager(string, []string) pagers.NonDeltaHandler[models.Driveable]
- func (h *RestoreHandler) NewItemContentUpload(context.Context, string, string) (models.UploadSessionable, error)
- func (h RestoreHandler) PostDrive(ctx context.Context, protectedResourceID, driveName string) (models.Driveable, error)
- func (h *RestoreHandler) PostItemInContainer(context.Context, string, string, models.DriveItemable, control.CollisionPolicy) (models.DriveItemable, error)
- func (h *RestoreHandler) PostItemLinkShareUpdate(ctx context.Context, driveID, itemID string, ...) (models.Permissionable, error)
- func (h *RestoreHandler) PostItemPermissionUpdate(context.Context, string, string, *drives.ItemItemsItemInvitePostRequestBody) (drives.ItemItemsItemInviteResponseable, error)
Constants ¶
View Source
const ( DriveItemFileName = "fnords.txt" DriveFileMetaData = `{"fileName": "` + DriveItemFileName + `"}` )
View Source
const DriveFilePayloadData = `` /* 2937-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func FileRespReadCloser ¶
func FileRespReadCloser(pl string) io.ReadCloser
func FileRespWithExtensions ¶
func FileRespWithExtensions(pl string, extData *details.ExtensionData) io.ReadCloser
Types ¶
type BackupHandler ¶
type BackupHandler[T any] struct { ItemInfo details.ItemInfo // FIXME: this is a hacky solution. Better to use an interface // and plug in the selector scope there. Sel selectors.Selector DriveItemEnumeration EnumerateDriveItemsDelta GI GetsItem GIP GetsItemPermission PathPrefixFn pathPrefixer PathPrefixErr error MetadataPathPrefixFn metadataPathPrefixer MetadataPathPrefixErr error CanonPathFn canonPather CanonPathErr error ProtectedResource idname.Provider Service path.ServiceType Category path.CategoryType // driveID -> itemPager ItemPagerV map[string]pagers.DeltaHandler[models.DriveItemable] LocationIDFn locationIDer GetResps []*http.Response GetErrs []error RootFolder models.DriveItemable // contains filtered or unexported fields }
func DefaultDriveBHWith ¶
func DefaultDriveBHWith( resource string, enumerator EnumerateDriveItemsDelta, ) *BackupHandler[models.DriveItemable]
func DefaultOneDriveBH ¶
func DefaultOneDriveBH(resourceOwner string) *BackupHandler[models.DriveItemable]
func DefaultSharePointBH ¶
func DefaultSharePointBH(resourceOwner string) *BackupHandler[models.DriveItemable]
func (BackupHandler[T]) AugmentItemInfo ¶
func (BackupHandler[T]) CanonicalPath ¶
func (BackupHandler[T]) EnumerateDriveItemsDelta ¶
func (h BackupHandler[T]) EnumerateDriveItemsDelta( ctx context.Context, driveID, prevDeltaLink string, cc api.CallConfig, ) pagers.NextPageResulter[models.DriveItemable]
func (BackupHandler[T]) FormatDisplayPath ¶
func (h BackupHandler[T]) FormatDisplayPath(_ string, pb *path.Builder) string
func (BackupHandler[T]) GetItem ¶
func (h BackupHandler[T]) GetItem(ctx context.Context, _, _ string) (models.DriveItemable, error)
func (BackupHandler[T]) GetItemPermission ¶
func (h BackupHandler[T]) GetItemPermission( ctx context.Context, _, _ string, ) (models.PermissionCollectionResponseable, error)
func (BackupHandler[T]) GetRootFolder ¶
func (h BackupHandler[T]) GetRootFolder(context.Context, string) (models.DriveItemable, error)
func (BackupHandler[T]) IncludesDir ¶
func (h BackupHandler[T]) IncludesDir(dir string) bool
func (BackupHandler[T]) IsAllPass ¶
func (h BackupHandler[T]) IsAllPass() bool
func (BackupHandler[T]) MetadataPathPrefix ¶
func (h BackupHandler[T]) MetadataPathPrefix(tID string) (path.Path, error)
func (BackupHandler[T]) NewDrivePager ¶
func (h BackupHandler[T]) NewDrivePager(string, []string) pagers.NonDeltaHandler[models.Driveable]
func (BackupHandler[T]) NewLocationIDer ¶
func (h BackupHandler[T]) NewLocationIDer(driveID string, elems ...string) details.LocationIDer
func (BackupHandler[T]) PathPrefix ¶
func (h BackupHandler[T]) PathPrefix(tID, driveID string) (path.Path, error)
func (BackupHandler[T]) ServiceCat ¶
func (h BackupHandler[T]) ServiceCat() (path.ServiceType, path.CategoryType)
type DeltaDrive ¶
func Drive ¶
func Drive(driveSuffix ...any) *DeltaDrive
func (*DeltaDrive) NewEnumer ¶
func (dd *DeltaDrive) NewEnumer() *DeltaDriveEnumerator
type DeltaDriveEnumerator ¶
type DeltaDriveEnumerator struct { Drive *DeltaDrive DeltaQueries []*DeltaQuery Err error // contains filtered or unexported fields }
func (*DeltaDriveEnumerator) With ¶
func (dde *DeltaDriveEnumerator) With(ds ...*DeltaQuery) *DeltaDriveEnumerator
func (*DeltaDriveEnumerator) WithErr ¶
func (dde *DeltaDriveEnumerator) WithErr(err error) *DeltaDriveEnumerator
WithErr adds an error that is always returned in the last delta index.
type DeltaQuery ¶
type DeltaQuery struct { Pages []NextPage DeltaUpdate pagers.DeltaUpdate Err error // contains filtered or unexported fields }
func Delta ¶
func Delta( resultDeltaID string, err error, ) *DeltaQuery
func DeltaWReset ¶
func DeltaWReset( resultDeltaID string, err error, ) *DeltaQuery
func (*DeltaQuery) Cancel ¶
func (dq *DeltaQuery) Cancel()
func (*DeltaQuery) NextPage ¶
func (dq *DeltaQuery) NextPage() ([]models.DriveItemable, bool, bool)
func (*DeltaQuery) Results ¶
func (dq *DeltaQuery) Results() (pagers.DeltaUpdate, error)
func (*DeltaQuery) With ¶
func (dq *DeltaQuery) With( pages ...NextPage, ) *DeltaQuery
type EnumerateDriveItemsDelta ¶
type EnumerateDriveItemsDelta struct {
DrivePagers map[string]*DeltaDriveEnumerator
}
func DriveEnumerator ¶
func DriveEnumerator( ds ...*DeltaDriveEnumerator, ) EnumerateDriveItemsDelta
func (EnumerateDriveItemsDelta) DrivePager ¶
func (en EnumerateDriveItemsDelta) DrivePager() *apiMock.Pager[models.Driveable]
func (EnumerateDriveItemsDelta) Drives ¶
func (en EnumerateDriveItemsDelta) Drives() []*DeltaDrive
func (EnumerateDriveItemsDelta) EnumerateDriveItemsDelta ¶
func (en EnumerateDriveItemsDelta) EnumerateDriveItemsDelta( _ context.Context, driveID, _ string, _ api.CallConfig, ) pagers.NextPageResulter[models.DriveItemable]
type FetchItemByName ¶
func (FetchItemByName) FetchItemByName ¶
type GetsItem ¶
type GetsItem struct { Item models.DriveItemable Err error }
type GetsItemPermission ¶
type GetsItemPermission struct { Perm models.PermissionCollectionResponseable Err error }
func (GetsItemPermission) GetItemPermission ¶
func (m GetsItemPermission) GetItemPermission( _ context.Context, _, _ string, ) (models.PermissionCollectionResponseable, error)
type NextPage ¶
type NextPage struct { Items []models.DriveItemable Reset bool }
type RestoreHandler ¶
type RestoreHandler struct { ItemInfo details.ItemInfo CollisionKeyMap map[string]api.DriveItemIDType CalledDeleteItem bool CalledDeleteItemOn string DeleteItemErr error CalledPostItem bool PostItemResp models.DriveItemable PostItemErr error DrivePagerV pagers.NonDeltaHandler[models.Driveable] PostDriveResp models.Driveable PostDriveErr error UploadSessionErr error }
func (*RestoreHandler) AugmentItemInfo ¶
func (*RestoreHandler) DeleteItem ¶
func (h *RestoreHandler) DeleteItem( _ context.Context, _, itemID string, ) error
func (*RestoreHandler) DeleteItemPermission ¶
func (*RestoreHandler) GetFolderByName ¶
func (h *RestoreHandler) GetFolderByName( context.Context, string, string, string, ) (models.DriveItemable, error)
func (*RestoreHandler) GetItemsInContainerByCollisionKey ¶
func (h *RestoreHandler) GetItemsInContainerByCollisionKey( context.Context, string, string, ) (map[string]api.DriveItemIDType, error)
func (*RestoreHandler) GetRootFolder ¶
func (h *RestoreHandler) GetRootFolder( context.Context, string, ) (models.DriveItemable, error)
func (RestoreHandler) NewDrivePager ¶
func (h RestoreHandler) NewDrivePager(string, []string) pagers.NonDeltaHandler[models.Driveable]
func (*RestoreHandler) NewItemContentUpload ¶
func (h *RestoreHandler) NewItemContentUpload( context.Context, string, string, ) (models.UploadSessionable, error)
func (*RestoreHandler) PostItemInContainer ¶
func (h *RestoreHandler) PostItemInContainer( context.Context, string, string, models.DriveItemable, control.CollisionPolicy, ) (models.DriveItemable, error)
func (*RestoreHandler) PostItemLinkShareUpdate ¶
func (h *RestoreHandler) PostItemLinkShareUpdate( ctx context.Context, driveID, itemID string, body *drives.ItemItemsItemCreateLinkPostRequestBody, ) (models.Permissionable, error)
func (*RestoreHandler) PostItemPermissionUpdate ¶
func (h *RestoreHandler) PostItemPermissionUpdate( context.Context, string, string, *drives.ItemItemsItemInvitePostRequestBody, ) (drives.ItemItemsItemInviteResponseable, error)
Click to show internal directories.
Click to hide internal directories.