Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound will be returned for any of not found errors
Functions ¶
This section is empty.
Types ¶
type PaginationParams ¶
PaginationParams should've used to pass pagination parameters to data layer
type Storer ¶
type Storer interface { Find(table string, query interface{}, result interface{}, pagination *PaginationParams) error FindOne(table string, query interface{}, result interface{}) error Aggregate(table string, query interface{}, result interface{}) error Create(table string, object interface{}) error CreateMany(table string, object []interface{}) error Update(table string, query interface{}, change interface{}) error UpdateMany(table string, query interface{}, change interface{}) error UpdateWithOptions(table string, query interface{}, change interface{}, options interface{}) error Delete(table string, query interface{}) error DeleteMany(table string, query interface{}) error Count(table string, query interface{}) (int, error) Close() error NewPaginationParams() *PaginationParams }
Storer defines common data storage functions
Click to show internal directories.
Click to hide internal directories.