store

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: 6 Imported by: ? 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 NewWrapper

func NewWrapper(s Storer) *wrapper

Types

type BackupDeleter

type BackupDeleter interface {
	DeleteBackup(ctx context.Context, backupID model.StableID) error
}

type BackupGetter

type BackupGetter interface {
	GetBackup(ctx context.Context, backupID model.StableID) (*backup.Backup, error)
}

type BackupGetterDeleter

type BackupGetterDeleter interface {
	BackupGetter
	BackupDeleter
}

type BackupGetterModelDeleter

type BackupGetterModelDeleter interface {
	BackupGetter
	ModelDeleter
}

type BackupStorer

type BackupStorer interface {
	Storer
	BackupWrapper
}

type BackupWrapper

type BackupWrapper interface {
	BackupGetterDeleter
	GetBackups(
		ctx context.Context,
		filters ...FilterOption,
	) ([]*backup.Backup, error)
}

type FilterOption

type FilterOption func(*queryFilters)

func Service

func Service(pst path.ServiceType) FilterOption

Service ensures the retrieved backups only match the specified service.

func Tags

func Tags(m map[string]string) FilterOption

Tags ensures the retrieved backups carry every key/value pair in m, in addition to any other FilterOption supplied in the same call (all FilterOptions narrow the same underlying tag match; see populate). m is copied immediately, at call time, not read lazily when the returned FilterOption is later applied: the caller's map stays entirely theirs to mutate or discard afterwards with no effect on what this filter matches, and the FilterOption value itself is safe to keep and reuse.

This is the general-purpose counterpart to Service above: it accepts any caller-defined tag key, including the tenant/policy/object tags pkg/engine's callers use. Backups created through pkg/engine.Backup cannot have a tag here collide with the fork's own ServiceTag or BackupTypeTag - see BackupOperation.AdditionalTags - so combining Tags with Service in the same call is safe and meaningful.

type MetadataFile

type MetadataFile struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Data any    `json:"data"`
}

MetadataFile holds a standard representation of a metadata file. Primarily used for debugging purposes.

type ModelDeleter

type ModelDeleter interface {
	DeleteWithModelStoreIDs(ctx context.Context, ids ...manifest.ID) error
}

type Storer

type Storer interface {
	Delete(ctx context.Context, s model.Schema, id model.StableID) error
	Get(ctx context.Context, s model.Schema, id model.StableID, data model.Model) error
	GetIDsForType(ctx context.Context, s model.Schema, tags map[string]string) ([]*model.BaseModel, error)
	GetWithModelStoreID(ctx context.Context, s model.Schema, id manifest.ID, data model.Model) error
	Put(ctx context.Context, s model.Schema, m model.Model) error
	Update(ctx context.Context, s model.Schema, m model.Model) error
	ModelDeleter
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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