Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadByType ¶
func SaveByType ¶
func UseDataBaseHandler ¶
func UseDataBaseHandler(typ string, handler DataBaseConnectionHandler)
Types ¶
type Config ¶
type Config struct {
types.Component
Type string `yaml:"type"`
Host string `yaml:"host"`
Database string `yaml:"database"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Tunnel string `yaml:"tunnel"`
ConnMaxLifeTime int64 `yaml:"max_life_time"`
ConnMaxIdleTime int64 `yaml:"max_idle_time"`
MaxIdleConns int `yaml:"max_idle_conn"`
MaxOpenConns int `yaml:"max_open_conn"`
LazyFetch bool `yaml:"lazy_fetch"`
// contains filtered or unexported fields
}
type DataBaseConnectionHandler ¶
type DataBaseConnectionHandler func(d *Starter, configure Datasource) (*sql.DB, error)
type Datasource ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func (*Helper) CreateDatasource ¶
func (d *Helper) CreateDatasource() (Datasource, error)
func (*Helper) SetDatasourceTag ¶
func (*Helper) SetPropertiesPrefix ¶
type ORMUpgrader ¶
type Starter ¶
type Starter struct {
types.Component
Config ssh.Config `value:"ssh"`
Log log.Logger `wire:""`
Datasource []Datasource `wire:""`
Repos []data.Repository `wire:""`
Upgraders []ORMUpgrader `wire:""`
TCPDialer *tcp.Dialer
SSHDialer *ssh.Dialer
// contains filtered or unexported fields
}
func NewStarter ¶
func NewStarter() *Starter
type Wrapper ¶
type Wrapper interface {
DB() *sql.DB
Configure() Datasource
}
Click to show internal directories.
Click to hide internal directories.