Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Save(t TableIdentity, f TableFields) error Count(t TableIdentity) (int, error) Update(t TableIdentity, f TableFields, index string) error Delete(t TableIdentity, index string, value interface{}) error Get(t TableIdentity, c TableConsumer, index string, value interface{}) error GetAll(t TableIdentity, order string, orderBy string) ([]map[string]interface{}, error) GetAllPerPage(t TableIdentity, order string, orderBy string, page int, responsePage int) ([]map[string]interface{}, int, error) }
DB defines a type which allows CRUD operations provided by a underline db structure.
type Migration ¶
type Migration interface {
Migrate() error
}
Migration defines an interface which provides structures to setup a new db migration call.
type TableConsumer ¶
TableConsumer defines an interface that exposes a Consume method.
type TableFields ¶
TableFields defines an interface which exposes method to return a map of all data associated with the defined structure.
type TableIdentity ¶
type TableIdentity interface {
Table() string
}
TableIdentity defines an interface which exposes a method returning table name associated with the giving implementing structure.
Click to show internal directories.
Click to hide internal directories.