persistence

package
v0.0.0-...-c1e6758 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SourceDriver

func SourceDriver() (source.Driver, error)

func WithTelemetry

func WithTelemetry(wrapped Storage, tracer trace.Tracer) *wrapper

WithTelemetry enriches Storage by adding instrumentation and context.

Types

type Storage

type Storage interface {
	// Package.
	CreatePackage(ctx context.Context, pkg *goastorage.Package) (*goastorage.Package, error)
	ListPackages(ctx context.Context) (goastorage.PackageCollection, error)
	ReadPackage(ctx context.Context, aipID uuid.UUID) (*goastorage.Package, error)
	UpdatePackageStatus(ctx context.Context, aipID uuid.UUID, status types.PackageStatus) error
	UpdatePackageLocationID(ctx context.Context, aipID, locationID uuid.UUID) error

	// Location.
	CreateLocation(
		ctx context.Context,
		location *goastorage.Location,
		config *types.LocationConfig,
	) (*goastorage.Location, error)
	ListLocations(ctx context.Context) (goastorage.LocationCollection, error)
	ReadLocation(ctx context.Context, locationID uuid.UUID) (*goastorage.Location, error)
	LocationPackages(ctx context.Context, locationID uuid.UUID) (goastorage.PackageCollection, error)
}

Directories

Path Synopsis
ent
db
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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