Documentation ¶
Index ¶
- Constants
- func Connect(opts ...Option) error
- func GetDB(name ...string) *gorm.DB
- type Option
- func Database(database string) Option
- func Host(host string) Option
- func MaxIdleConn(num int) Option
- func MaxLifeTime(t time.Duration) Option
- func MaxOpenConn(num int) Option
- func Name(name string) Option
- func Password(password string) Option
- func Port(port int32) Option
- func ReadTimeout(t int) Option
- func Username(username string) Option
- func WriteTimeout(t int) Option
- type Options
Constants ¶
View Source
const ( Silent = "silent" Warn = "warn" Error = "error" Info = "info" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
func MaxIdleConn ¶
func MaxLifeTime ¶
func MaxOpenConn ¶
func ReadTimeout ¶
func WriteTimeout ¶
Click to show internal directories.
Click to hide internal directories.