Get() methods from all repositories now return a ErrNotFound when the id is nonexistent

This commit is contained in:
Deluan
2016-03-18 11:33:50 -04:00
parent db34122faf
commit c90a50827a
11 changed files with 70 additions and 42 deletions
+6
View File
@@ -1,11 +1,17 @@
package domain
import "errors"
type BaseRepository interface {
NewId(fields ...string) string
CountAll() (int64, error)
Exists(id string) (bool, error)
}
var (
ErrNotFound = errors.New("Data not found")
)
type QueryOptions struct {
SortBy string
Alpha bool