33 lines
692 B
Go
33 lines
692 B
Go
package config
|
|
|
|
import "github.com/zeromicro/go-zero/zrpc"
|
|
|
|
type Config struct {
|
|
zrpc.RpcServerConf
|
|
Nacos NacosConf
|
|
Mysql MysqlConf
|
|
}
|
|
|
|
type NacosConf struct {
|
|
Hosts []string
|
|
NamespaceId string `json:",optional"`
|
|
Group string `json:",optional"`
|
|
RegisterIP string `json:",optional"`
|
|
}
|
|
|
|
type MysqlConf struct {
|
|
Host string
|
|
Port int
|
|
User string
|
|
Password string
|
|
Database string
|
|
Charset string `json:",default=utf8mb4"`
|
|
Prefix string `json:",optional"`
|
|
|
|
ReadHost string `json:",optional"`
|
|
ReadPort int `json:",optional"`
|
|
ReadUser string `json:",optional"`
|
|
ReadPassword string `json:",optional"`
|
|
ReadDatabase string `json:",optional"`
|
|
}
|