Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is the error returned if a resource cannot be found. ErrNotFound = errors.New("not found error") // ErrNotValid is the error returned if the data provided is invalid. ErrNotValid = errors.New("invalid data error") // ErrInternal is the error returned if an internal error occurred. ErrInternal = errors.New("internal error") )
Functions ¶
func WithTelemetry ¶
WithTelemetry enriches Service by adding instrumentation and context.
Types ¶
type PresTaskUpdater ¶
type PresTaskUpdater func(*datatypes.PreservationTask) (*datatypes.PreservationTask, error)
type Service ¶
type Service interface { // CreatePackage persists the given Package to the data store then updates // the Package from the data store, adding auto-generated data // (e.g. ID, CreatedAt). CreatePackage(context.Context, *datatypes.Package) error UpdatePackage(context.Context, uint, PackageUpdater) (*datatypes.Package, error) CreatePreservationTask(context.Context, *datatypes.PreservationTask) error UpdatePreservationTask(ctx context.Context, id uint, updater PresTaskUpdater) (*datatypes.PreservationTask, error) }
Directories ¶
Path | Synopsis |
---|---|
ent
|
|
Package fake is a generated GoMock package.
|
Package fake is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.