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 PackageFilter ¶
type Page ¶
type Page struct { // Limit is the maximum number of results per page. Limit int // Offset is the ordinal position, relative to the start of the unfiltered // set, of the first result of the page. Offset int // Total is the total number of search results before paging. Total int }
Page represents a subset of results within a search result set.
func (*Page) Goa ¶
func (p *Page) Goa() *goapackage.EnduroPage
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, int, PackageUpdater) (*datatypes.Package, error) ListPackages(context.Context, *PackageFilter) ([]*datatypes.Package, *Page, error) CreatePreservationAction(context.Context, *datatypes.PreservationAction) error CreatePreservationTask(context.Context, *datatypes.PreservationTask) error UpdatePreservationTask(ctx context.Context, id int, updater PresTaskUpdater) (*datatypes.PreservationTask, error) }
type Sort ¶
type Sort []SortColumn
Sort determines how the filtered results are sorted by specifying a slice of sort columns. The first SortColumn has the highest sort precedence, and the last SortColumn the lowest precedence.
type SortColumn ¶
type SortColumn struct { // Name of the column on which to sort the results. Name string // Desc is true if the sort order is descending. Desc bool }
SortColumn specifies a column name on which to sort results, and the direction of the sort (ascending or descending).
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.