Documentation ¶
Index ¶
Constants ¶
View Source
const ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" White = "\033[37m" BlueBold = "\033[34;1m" MagentaBold = "\033[35;1m" RedBold = "\033[31;1m" YellowBold = "\033[33;1m" )
Colors
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configure ¶
Configure config interface
func NewConfigure ¶
func NewConfigure( dsn string, maxIdleConns, maxOpenConns, connMaxIdleTime, connMaxLifetime int, registers []ResolverConfigure) Configure
NewConfigure 初始化 Configure
type DBConfig ¶
type DBConfig struct {
// contains filtered or unexported fields
}
DBConfig db config
type DBResolverConfig ¶
type DBResolverConfig struct {
// contains filtered or unexported fields
}
DBResolverConfig db resolver config
func (*DBResolverConfig) Init ¶
func (e *DBResolverConfig) Init( register *dbresolver.DBResolver, open func(string) gorm.Dialector) *dbresolver.DBResolver
Init init
type ResolverConfigure ¶
type ResolverConfigure interface {
Init(*dbresolver.DBResolver, func(string) gorm.Dialector) *dbresolver.DBResolver
}
ResolverConfigure resolver config interface
func NewResolverConfigure ¶
func NewResolverConfigure(sources, replicas []string, policy string, tables []string) ResolverConfigure
NewResolverConfigure 初始化 ResolverConfigure
Click to show internal directories.
Click to hide internal directories.