Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBadRequest error = errors.New("Bad request")
ErrBadRequest is error for case when bad request
var ErrDuplicate error = errors.New("Duplicate error")
ErrDuplicate error
var ErrInternal error = errors.New("Internal error")
ErrInternal is error for case when smth went wrong
var ErrNotFound error = errors.New("Not found")
ErrNotFound is error for case when entity not found
var ErrNotInitialised error = errors.New("SQL Migrator is not initialised")
ErrNotInitialised error
var ErrUndefinedTypeOfAction error = errors.New("Undefined type of action")
ErrUndefinedTypeOfAction error
var ErrUsersFunc error = errors.New("User's func error")
ErrUsersFunc error
var ErrUsersSQL error = errors.New("User's SQL string error")
ErrUsersSQL error
var MigrationStatuses = []string{"not applied", "applied", "error"}
MigrationStatuses is the slice of the migration statuses
var MigrationTypes = []interface{}{migration.MigrationTypeSQL, migration.MigrationTypeGo}
MigrationTypes is slice of migration types
Functions ¶
func AppErrorConv ¶
AppErrorConv is a converter from app errors to api errors
Types ¶
type Configuration ¶
Configuration struct
func (*Configuration) DBxConf ¶
func (c *Configuration) DBxConf() *dbx.Configuration
DBxConf converts to the dbx configuration
type Logger ¶
type Logger interface { Print(v ...interface{}) Fatal(v ...interface{}) }
Logger interface for application
type Migration ¶
Migration struct Up and Down is a Func or a string (plain SQL text)
func (Migration) CoreMigration ¶
CoreMigration converts to core migration
type MigrationCreateParams ¶
MigrationCreateParams is struct for params for creation of migration
func (*MigrationCreateParams) CoreParams ¶
func (p *MigrationCreateParams) CoreParams() *migration.CreateParams
CoreParams converts to core params