temp
This commit is contained in:
166
Server/common/config/config.go
Normal file
166
Server/common/config/config.go
Normal file
@@ -0,0 +1,166 @@
|
||||
package config
|
||||
|
||||
type (
|
||||
LoggerConfig struct {
|
||||
Level string `json:"level"`
|
||||
MaxAge int `json:"max_age"`
|
||||
MaxBackUp int `json:"max_back_up"`
|
||||
MaxSize int `json:"max_size"`
|
||||
Debug bool `json:"debug"`
|
||||
}
|
||||
|
||||
RedisConfig struct {
|
||||
Host string `json:"host" env:"REDIS_HOST"`
|
||||
Port int `json:"port" env:"REDIS_PORT"`
|
||||
Auth string `json:"auth" env:"REDIS_AUTH"`
|
||||
MaxIdle int `json:"max_idle" env:"REDIS_MAX_IDLE"`
|
||||
MaxActive int `json:"max_active" env:"REDIS_MAX_ACTIVE"`
|
||||
Db int `json:"db" env:"REDIS_DB"`
|
||||
Tls bool `json:"tls"`
|
||||
UserName string `json:"user_name"`
|
||||
}
|
||||
|
||||
EtcdConfig struct {
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
TTL int64 `json:"ttl"`
|
||||
}
|
||||
|
||||
JWTConfig struct {
|
||||
Secret string `json:"secret"`
|
||||
Expires int `json:"expires"`
|
||||
}
|
||||
|
||||
TableConfig struct {
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
ConnectionInfo struct {
|
||||
WebSocket string `json:"web_socket"`
|
||||
HttpAddr string `json:"http_addr"`
|
||||
GameSocketHost string `json:"game_socket_host"`
|
||||
GameSocketPort int `json:"game_socket_port"`
|
||||
}
|
||||
|
||||
MysqlConfig struct {
|
||||
Driver string `json:"driver"`
|
||||
Host string `json:"host"`
|
||||
Port string `json:"port"`
|
||||
User string `json:"user"`
|
||||
Password string `json:"password"`
|
||||
DbName string `json:"db_name"`
|
||||
}
|
||||
|
||||
MongoConfig struct {
|
||||
User string `json:"user"`
|
||||
Password string `json:"password"`
|
||||
SSLCaFile string `json:"ssl_ca_file"`
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
}
|
||||
|
||||
GamesInfo struct {
|
||||
ConnectInfo []ConnectionInfo `json:"connect_info"`
|
||||
}
|
||||
TencentVideo struct {
|
||||
AppID int `json:"appID"`
|
||||
Key string `json:"secretKey"`
|
||||
CallBackKey string `json:"callBackKey"`
|
||||
Prefix string `json:"prefix"`
|
||||
TencentAsrCloudOS TencentAsrCloudOS `json:"tencent_asr_cloud_os"`
|
||||
}
|
||||
TencentAsr struct {
|
||||
AppID string `json:"appID"`
|
||||
Key string `json:"secretKey"`
|
||||
CallBackKey string `json:"callBackKey"`
|
||||
Prefix string `json:"prefix"`
|
||||
}
|
||||
TencentAsrCloudOS struct {
|
||||
Bucket string `json:"bucket"`
|
||||
|
||||
Region string `json:"region"`
|
||||
|
||||
BucketURL string `json:"bucketURL"`
|
||||
|
||||
CIURL string `json:"CIURL"`
|
||||
|
||||
CIWorkflows map[string]TencentCIWorkflows `json:"CIWorkflows"`
|
||||
}
|
||||
TencentCIWorkflows struct {
|
||||
Name string `json:"name"`
|
||||
|
||||
WorkflowId string `json:"workflowId"`
|
||||
}
|
||||
|
||||
TencentCloudOS struct {
|
||||
BucketURL string `json:"bucketURL"`
|
||||
ServiceURL string `json:"serviceURL"`
|
||||
BatchURL string `json:"batchURL"`
|
||||
CIURL string `json:"CIURL"`
|
||||
}
|
||||
|
||||
TencentSdkCommon struct {
|
||||
SecretId string `json:"secretId"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}
|
||||
BackHttp struct {
|
||||
Scheme string `json:"scheme"`
|
||||
Host string `json:"host"`
|
||||
Xkey string `json:"xkey"`
|
||||
}
|
||||
Us struct {
|
||||
PublicKey string `json:"public_key"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
BucketHost string `json:"bucket_host"`
|
||||
BucketName string `json:"bucket_name"`
|
||||
FileHost string `json:"file_host"`
|
||||
VerifyUploadMD5 bool `json:"verfiy_upload_md5"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
UsHostPath string `json:"us_host_path"`
|
||||
}
|
||||
|
||||
AIServer struct {
|
||||
Scheme string `json:"scheme"`
|
||||
Host string `json:"host"`
|
||||
}
|
||||
|
||||
KafkaConfig struct {
|
||||
Brokers []string `json:"brokers"`
|
||||
ChunkSize int `json:"chunkSize"`
|
||||
FlushInterval int `json:"flushInterval"`
|
||||
}
|
||||
|
||||
Elecnest struct {
|
||||
Scheme string `json:"scheme"`
|
||||
Host string `json:"host"`
|
||||
}
|
||||
|
||||
WechatMini struct {
|
||||
Scheme string `json:"scheme"`
|
||||
Host string `json:"host"`
|
||||
EnvVersion string `json:"envVersion"`
|
||||
GetWxACodeUnLimitPath string `json:"getWxACodeUnLimitPath"`
|
||||
GenerateUrlLinkPath string `json:"generateUrlLinkPath"`
|
||||
}
|
||||
|
||||
CommonConfig struct {
|
||||
Logger LoggerConfig `json:"logger"`
|
||||
Redis RedisConfig `json:"redis"`
|
||||
Etcd EtcdConfig `json:"etcd"`
|
||||
Tables TableConfig `json:"tables"`
|
||||
JWT JWTConfig `json:"jwt"`
|
||||
MysqlConfig MysqlConfig `json:"mysql"`
|
||||
MongoConfig MongoConfig `json:"mongo"`
|
||||
Kafka KafkaConfig `json:"kafka"`
|
||||
TencentVideo TencentVideo `json:"tencent_video_call"`
|
||||
TencentCloudOS TencentCloudOS `json:"tencent_cloud_os"`
|
||||
TencentSdkCommon TencentSdkCommon `json:"tencent_sdk_common"`
|
||||
GamesInfo GamesInfo `json:"games"`
|
||||
Back BackHttp `json:"back_http"`
|
||||
Us Us `json:"us"`
|
||||
AIServer AIServer `json:"ai_server"`
|
||||
Elecnest *Elecnest `json:"elecnest"`
|
||||
OpenLog bool `json:"open_log"`
|
||||
WechatMini *WechatMini `json:"wechat_mini"`
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user