quintodrome/model/base.go

21 lines
274 B
Go
Raw Normal View History

2020-01-14 18:22:34 -09:00
package model
import "errors"
type BaseRepository interface {
2016-03-05 15:40:36 -09:00
CountAll() (int64, error)
Exists(id string) (bool, error)
}
2016-03-03 18:44:28 -09:00
var (
2016-03-23 12:30:38 -08:00
ErrNotFound = errors.New("data not found")
)
2016-03-03 18:44:28 -09:00
type QueryOptions struct {
SortBy string
Alpha bool
Desc bool
Offset int
Size int
}