Started work on new layered setup, making a huge mess.
the build was successful

This commit is contained in:
2019-06-09 12:37:17 +02:00
parent 6fa9f64f2d
commit cdf4e6f667
33 changed files with 540 additions and 210 deletions
+11
View File
@@ -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")
+13
View File
@@ -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)
}