Documentation ¶
Index ¶
- Constants
- type GeneralConfig
- func (config *GeneralConfig) Ini() *GeneralConfig
- func (config *GeneralConfig) PrintDatasource()
- func (config *GeneralConfig) PrintRedisInfo()
- func (config *GeneralConfig) ReadConfig()
- func (config *GeneralConfig) ReadDatasource(basePath string) any
- func (config *GeneralConfig) ReadRedis(basePath string) any
- func (config *GeneralConfig) ReadRpc(basePath string) any
- func (entity *GeneralConfig) String() string
Constants ¶
View Source
const CONFIG_FILE = "/config/application.yml"
View Source
const ENV_BASEPATH = "BasePath"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeneralConfig ¶
type GeneralConfig struct { BasePath string ConfigFile string Redis struct { Db int32 Addr string Password string } Server struct { Port int `yaml:"port"` } `yaml:"publisher"` // datasource Datasource struct { DriverName string `yaml:"driverName"` Host string `yaml:"host"` Port int `yaml:"port"` Database string `yaml:"database"` Username string `yaml:"username"` Password string `yaml:"password"` Charset string `yaml:"charset"` } `yaml:"datasource"` Rpc struct { HostIp string `yaml:"hostIp"` ServerName string `yaml:"serverName"` ClientName string `yaml:"clientName"` } `yaml:"rpcservice"` Nats struct { Url string } Es struct { Url string } }
var ConfigInst *GeneralConfig = &GeneralConfig{}
func NewGenealConfig ¶
func NewGenealConfig() *GeneralConfig
func (*GeneralConfig) Ini ¶
func (config *GeneralConfig) Ini() *GeneralConfig
func (*GeneralConfig) PrintDatasource ¶
func (config *GeneralConfig) PrintDatasource()
func (*GeneralConfig) PrintRedisInfo ¶
func (config *GeneralConfig) PrintRedisInfo()
func (*GeneralConfig) ReadConfig ¶
func (config *GeneralConfig) ReadConfig()
func (*GeneralConfig) ReadDatasource ¶
func (config *GeneralConfig) ReadDatasource(basePath string) any
func (*GeneralConfig) ReadRedis ¶
func (config *GeneralConfig) ReadRedis(basePath string) any
func (*GeneralConfig) ReadRpc ¶
func (config *GeneralConfig) ReadRpc(basePath string) any
func (*GeneralConfig) String ¶
func (entity *GeneralConfig) String() string
Click to show internal directories.
Click to hide internal directories.