1 Star 0 Fork 0

qhitc/grpcwebserver

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config.go 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
qhitc 提交于 2023-05-29 10:06 +08:00 . 创建提交
package config
type Config struct {
General struct {
LogLevel int `mapstructure:"log_level"`
LogToSyslog bool `mapstructure:"log_to_syslog"`
PasswordHashIterations int `mapstructure:"password_hash_iterations"`
GRPCDefaultResolverScheme string `mapstructure:"grpc_default_resolver_scheme"`
DSN string `mapstructure:"dsn"`
TtsPath string `mapstructure:"ttspath"`
TtsApiKey string `mapstructure:"ttsapikey"`
TtsSecretKey string `mapstructure:"ttssecretkey"`
UpdateCheckURL string `mapstructure:"updatecheckurl"`
} `mapstructure:"general"`
ExternalAPI struct {
Bind string `mapstructure:"bind"`
Secret string `mapstructure:"secret"`
User string `mapstructure:"user"`
Passwd string `mapstructure:"passwd"`
NetIp string `mapstructure:"netip"`
NetMask string `mapstructure:"netmask"`
NetGateway string `mapstructure:"netgateway"`
UdpPort uint32 `mapstructure:"udpport"`
} `mapstructure:"external_api"`
ControllerProxy struct {
Ip string `mapstructure:"ip"`
Port int32 `mapstructure:"port"`
Token string `mapstructure:"token"`
ServicePath string `mapstructure:"service_path"`
} `mapstructure:"controller_proxy"`
ComserverProxy struct {
Ip string `mapstructure:"ip"`
Port int32 `mapstructure:"port"`
Token string `mapstructure:"token"`
ServicePath string `mapstructure:"service_path"`
} `mapstructure:"comserver_proxy"`
}
// C holds the global configuration.
var Conf Config
// Get returns the configuration.
func Get() *Config {
return &Conf
}
// Set sets the configuration.
func Set(c Config) {
Conf = c
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qhitc_admin/grpcwebserver.git
git@gitee.com:qhitc_admin/grpcwebserver.git
qhitc_admin
grpcwebserver
grpcwebserver
dc0fecf8d0e2

搜索帮助