store

package
v0.0.0-...-880cb89 Latest Latest
Warning

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

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

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.

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