Documentation ¶ Index ¶ func NewDB(opts ...DBOptions) (*gorm.DB, error) type DBOptions type Options type Server Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewDB ¶ func NewDB(opts ...DBOptions) (*gorm.DB, error) Types ¶ type DBOptions ¶ type DBOptions = func(*Options) type Options ¶ type Options struct { Debug bool `json:"debug"` Name string `json:"name"` Idle int `json:"idle"` Open int `json:"open"` Source []Server `json:"source"` Replica []Server `json:"replica"` Logger logger.Interface } type Server ¶ type Server struct { Host string `json:"host"` Port int32 `json:"port"` User string `json:"user"` Pwd string `json:"pwd"` } Source Files ¶ View all Source files db.go Click to show internal directories. Click to hide internal directories.