mock

package
v0.0.0-...-1b842a1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUnversionedRestoreCollection

func NewUnversionedRestoreCollection(
	t *testing.T,
	col data.RestoreCollection,
) *unversionedRestoreCollection

func NewVersionedBackupCollection

func NewVersionedBackupCollection(
	t *testing.T,
	col data.BackupCollection,
) *versionedBackupCollection

Types

type Collection

type Collection struct {
	Path                 path.Path
	Loc                  *path.Builder
	ItemData             []data.Item
	ItemsRecoverableErrs []error
	CState               data.CollectionState

	// For restore
	AuxItems map[string]data.Item
}

func (Collection) DoNotMergeItems

func (c Collection) DoNotMergeItems() bool

func (Collection) FetchItemByName

func (c Collection) FetchItemByName(
	ctx context.Context,
	name string,
) (data.Item, error)

func (Collection) FullPath

func (c Collection) FullPath() path.Path

func (Collection) Items

func (c Collection) Items(ctx context.Context, errs *fault.Bus) <-chan data.Item

func (Collection) LocationPath

func (c Collection) LocationPath() *path.Builder

func (Collection) PreviousPath

func (c Collection) PreviousPath() path.Path

func (Collection) State

func (c Collection) State() data.CollectionState

type Item

type Item struct {
	DeletedFlag  bool
	ItemID       string
	ItemInfo     details.ItemInfo
	ItemSize     int64
	ModifiedTime time.Time
	Reader       io.ReadCloser
	ReadErr      error
}

func (Item) Deleted

func (s Item) Deleted() bool

func (*Item) ID

func (s *Item) ID() string

func (*Item) Info

func (s *Item) Info() (details.ItemInfo, error)

func (*Item) ModTime

func (s *Item) ModTime() time.Time

func (*Item) Size

func (s *Item) Size() int64

func (*Item) ToReader

func (s *Item) ToReader() io.ReadCloser

type RestoreCollection

type RestoreCollection struct {
	data.Collection
	AuxItems map[string]data.Item
}

func (RestoreCollection) FetchItemByName

func (rc RestoreCollection) FetchItemByName(
	ctx context.Context,
	name string,
) (data.Item, error)

Jump to

Keyboard shortcuts

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