mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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