Documentation ¶
Index ¶
- func MysqlGetVersion(tx migration.LimitedTx) (int, error)
- func MysqlSetVersion(tx migration.LimitedTx, version int) error
- type Configuration
- type Configurations
- type DBWrapper
- func (w DBWrapper) Close()
- func (w DBWrapper) Exec(query string, args ...interface{}) (sql.Result, error)
- func (w DBWrapper) Query(query string, args ...interface{}) (IRows, error)
- func (w DBWrapper) QueryRow(query string, args ...interface{}) IRow
- func (w DBWrapper) SetMaxIdleConns(n int)
- func (w DBWrapper) SetMaxOpenConns(n int)
- type DbProvider
- type IDb
- type IRow
- type IRows
- type ISql
- type MemoryStore
- type RowWrapper
- type RowsWrapper
- type SQLWrapper
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
func (Configuration) StringifiedJSON ¶
func (rv Configuration) StringifiedJSON() (string, error)
type Configurations ¶
type Configurations []Configuration
func (Configurations) Len ¶
func (c Configurations) Len() int
func (Configurations) Less ¶
func (c Configurations) Less(i, j int) bool
func (Configurations) StringifiedJSON ¶
func (c Configurations) StringifiedJSON() (string, error)
func (Configurations) Swap ¶
func (c Configurations) Swap(i, j int)
type DBWrapper ¶
type DBWrapper struct {
// contains filtered or unexported fields
}
func NewDbWrapper ¶
func (DBWrapper) SetMaxIdleConns ¶
func (DBWrapper) SetMaxOpenConns ¶
type DbProvider ¶
func NewConcreteDbProvider ¶
func NewConcreteDbProvider(sql ISql, config config.DBConfig) (DbProvider, error)
type ISql ¶
type ISql interface { OpenWith( driverName, dataSourceName string, migrations []migration.Migrator, getVersion migration.GetVersion, setVersion migration.SetVersion, ) (IDb, error) }
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func (MemoryStore) GetByID ¶
func (store MemoryStore) GetByID(id string) (Configuration, error)
func (MemoryStore) GetByName ¶
func (store MemoryStore) GetByName(name string) (Configurations, error)
type RowWrapper ¶
type RowWrapper struct {
// contains filtered or unexported fields
}
func NewRowWrapper ¶
func NewRowWrapper(row *sql.Row) RowWrapper
func (RowWrapper) Scan ¶
func (w RowWrapper) Scan(dest ...interface{}) error
type RowsWrapper ¶
type RowsWrapper struct {
// contains filtered or unexported fields
}
func NewRowsWrapper ¶
func NewRowsWrapper(rows *sql.Rows) RowsWrapper
func (RowsWrapper) Close ¶
func (w RowsWrapper) Close() error
func (RowsWrapper) Next ¶
func (w RowsWrapper) Next() bool
func (RowsWrapper) Scan ¶
func (w RowsWrapper) Scan(dest ...interface{}) error
type SQLWrapper ¶
type SQLWrapper struct { }
func NewSQLWrapper ¶
func NewSQLWrapper() SQLWrapper
func (SQLWrapper) OpenWith ¶ added in v0.0.146
func (w SQLWrapper) OpenWith( driverName, dataSourceName string, migrations []migration.Migrator, versionGet migration.GetVersion, versionSet migration.SetVersion, ) (IDb, error)
type Store ¶
type Store interface { Put(key string, value string, checksum string) (string, error) GetByName(name string) (Configurations, error) GetByID(id string) (Configuration, error) Delete(key string) (int, error) }
func CreateStore ¶
func CreateStore(config config.ServerConfig) (store Store, err error)
func NewMemoryStore ¶
func NewMemoryStore() Store
func NewMysqlStore ¶
func NewMysqlStore(dbProvider DbProvider) Store
func NewPostgresStore ¶
func NewPostgresStore(dbProvider DbProvider) Store
Source Files ¶
Click to show internal directories.
Click to hide internal directories.