Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UseDataBaseHandler ¶
func UseDataBaseHandler(typ string, handler DataBaseConnectionHandler)
Types ¶
type Config ¶
type Config struct { bean.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 { bean.Component Config ssh.Config `value:"ssh"` Log log.Logger TCPDialer *tcp.Dialer `not:""` SSHDialer *ssh.Dialer `not:""` Datasource []Datasource Repos []component.Repository Upgraders []ORMUpgrader // 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.