This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package repositories
|
||||
|
||||
import "errors"
|
||||
|
||||
// A Bundle is a set of repositories.
|
||||
type Bundle struct {
|
||||
Tags TagRepository
|
||||
}
|
||||
|
||||
// ErrNotFound should be returned instead of any database-specific not found error.
|
||||
var ErrNotFound = errors.New("Resource not found")
|
||||
@@ -0,0 +1,13 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.aiterp.net/rpdata/api/models"
|
||||
)
|
||||
|
||||
// TagRepository is an interface for a database using logs.
|
||||
type TagRepository interface {
|
||||
Find(ctx context.Context, kind, name string) (*models.Tag, error)
|
||||
List(ctx context.Context, filter models.TagFilter) ([]*models.Tag, error)
|
||||
}
|
||||
Reference in New Issue
Block a user