Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigKey = "mysql"
ConfigKey for this repo
Variables ¶
View Source
var Factory *tao.BaseFactory[*gorm.DB]
Factory is the global factory instance for managing gorm.DB
View Source
var M = &Config{}
M is the global config instance for tao-mysql
Functions ¶
Types ¶
type Config ¶
type Config struct {
tao.BaseMultiConfig[InstanceConfig]
RunAfters []string `json:"run_after,omitempty" yaml:"run_after,omitempty"`
}
Config 总配置,实现 tao.MultiConfig 接口
type InstanceConfig ¶
type InstanceConfig struct {
Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"`
User string `json:"user" yaml:"user"`
Password string `json:"password" yaml:"password"`
DB string `json:"db" yaml:"db"`
Charset string `json:"charset" yaml:"charset"`
ParseTime *bool `json:"parse_time" yaml:"parse_time"`
Location string `json:"local" yaml:"local"`
}
InstanceConfig 单实例配置
Click to show internal directories.
Click to hide internal directories.