site

package
v0.0.0-...-df423d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectLibraries

CollectLibraries constructs a onedrive Collections struct and Get()s all the drives associated with the site.

func CollectLists

func CollectLists(
	ctx context.Context,
	bh backupHandler,
	bpc inject.BackupProducerConfig,
	ac api.Client,
	tenantID string,
	scope selectors.SharePointScope,
	su support.StatusUpdater,
	counter *count.Bus,
	errs *fault.Bus,
) ([]data.BackupCollection, bool, error)

func CollectPages

CollectPages constructs a sharepoint Collections struct and Get()s the associated M365 IDs for the associated Pages.

func NewExportCollection

func NewExportCollection(
	baseDir string,
	backingCollection []data.RestoreCollection,
	backupVersion int,
	stats *metrics.ExportStats,
) export.Collectioner

func NewLazyFetchCollection

func NewLazyFetchCollection(
	getter getItemByIDer,
	folderPath, prevPath path.Path,
	locPb *path.Builder,
	statusUpdater support.StatusUpdater,
	counter *count.Bus,
) *lazyFetchCollection

func NewListsBackupHandler

func NewListsBackupHandler(protectedResource string, ac api.Lists) listsBackupHandler

func NewListsRestoreHandler

func NewListsRestoreHandler(protectedResource string, ac api.Lists) listsRestoreHandler

func NewPrefetchCollection

func NewPrefetchCollection(
	getter getItemByIDer,
	folderPath, prevPath path.Path,
	locPb *path.Builder,
	ac api.Client,
	scope selectors.SharePointScope,
	statusUpdater support.StatusUpdater,
	ctrlOpts control.Options,
	counter *count.Bus,
) *prefetchCollection

NewPrefetchCollection constructor function for creating a prefetchCollection

func RestoreListCollection

func RestoreListCollection(
	ctx context.Context,
	rh restoreHandler,
	dc data.RestoreCollection,
	restoreCfg control.RestoreConfig,
	deets *details.Builder,
	collisionKeyToItemID map[string]string,
	ctr *count.Bus,
	errs *fault.Bus,
) (support.CollectionMetrics, error)

func RestorePageCollection

func RestorePageCollection(
	ctx context.Context,
	gs graph.Servicer,
	dc data.RestoreCollection,
	restoreContainerName string,
	deets *details.Builder,
	errs *fault.Bus,
) (support.CollectionMetrics, error)

RestorePageCollection handles restoration of an individual site page collection. returns: - the collection's item and byte count metrics - the context cancellation station. True iff context is canceled.

Types

type DataCategory

type DataCategory int
const (
	Unknown DataCategory = 0
	List    DataCategory = 1
	Pages   DataCategory = 2
)

type DeleteLister

type DeleteLister interface {
	DeleteList(
		ctx context.Context,
		listID string,
	) error
}

type GetLister

type GetLister interface {
	GetList(
		ctx context.Context,
		listID string,
	) (models.Listable, *details.SharePointInfo, error)
}

type GetListsByCollisionKeyser

type GetListsByCollisionKeyser interface {
	// GetListsByCollisionKey looks up all lists currently in
	// the site, and returns them in a map[collisionKey]listID.
	// The collision key is displayName of the list
	// which uniquely identifies the list.
	// Collision key checks are used during restore to handle the on-
	// collision restore configurations that cause the list restore to get
	// skipped, replaced, or copied.
	GetListsByCollisionKey(ctx context.Context) (map[string]string, error)
}

type PatchLister

type PatchLister interface {
	PatchList(
		ctx context.Context,
		listID string,
		list models.Listable,
	) (models.Listable, error)
}

type PostLister

type PostLister interface {
	PostList(
		ctx context.Context,
		listName string,
		storedList models.Listable,
		errs *fault.Bus,
	) (models.Listable, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL