Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package webg
|
||||
|
||||
const EsIndex = "sz"
|
||||
|
||||
var (
|
||||
Conf GlobalCfgEx
|
||||
)
|
||||
|
||||
type GlobalCfgEx struct {
|
||||
Redis struct {
|
||||
Addr string `yaml:"addr"`
|
||||
Db int `yaml:"db"`
|
||||
Passwd string `yaml:"passwd"`
|
||||
Subscribe bool `yaml:"subscribe"` // 是否有订阅功能
|
||||
}
|
||||
Mongodb struct {
|
||||
Addr string `yaml:"addr"`
|
||||
LogAddr string `yaml:"logaddr"`
|
||||
}
|
||||
Es struct {
|
||||
Addr string `yaml:"addr"`
|
||||
User string `yaml:"user"`
|
||||
Pass string `yaml:"pass"`
|
||||
} `yaml:"es"`
|
||||
JwtKey string `yaml:"jwtKey"`
|
||||
CdnKey string `yaml:"cdnKey"`
|
||||
TgToken string `yaml:"tgToken"`
|
||||
RunMod string `yaml:"runMod"`
|
||||
Pprof bool `yaml:"pprof"`
|
||||
Host string `yaml:"host"`
|
||||
ListenAddr string `yaml:"listenAddr"`
|
||||
VersionUrl string `yaml:"versionUrl"`
|
||||
CdnDomain string `yaml:"cdnDomain"` // cdn域名
|
||||
OrigDomain string `yaml:"origDomain"` // 源站域名
|
||||
WebM3u8Host string `yaml:"webM3u8Host"` // web对外可访问域名(供老司机转码服务器拉取m3u8)
|
||||
TsAuthKey string `yaml:"tsAuthKey"`
|
||||
BucketVideoAddressV2 string `yaml:"bucketVideoAddressV2"`
|
||||
LsjMediaConf struct {
|
||||
AppId string `yaml:"appId"`
|
||||
ApiKey string `yaml:"apiKey"`
|
||||
ApiUrl string `yaml:"apiUrl"`
|
||||
M3u8Yuan string `yaml:"m3u8Yuan"`
|
||||
TsYuan string `yaml:"tsYuan"`
|
||||
ImageYuan string `yaml:"imageYuan"`
|
||||
DomainsRefreshHr int64 `yaml:"domainsRefreshHr"`
|
||||
} `yaml:"lsjMediaConf"`
|
||||
MediaResourceDBCfg struct { //黄果
|
||||
BaseUrl string `yaml:"baseUrl"` // 域名
|
||||
Merchat string `yaml:"merchat"` // 商户号
|
||||
Secret string `yaml:"secret"` // 商户密钥
|
||||
} `yaml:"mediaResourceDBCfg"`
|
||||
PlayletMediaResourceDBCfg struct { //嘉华
|
||||
BaseUrl string `yaml:"baseUrl"` // 域名
|
||||
Merchat string `yaml:"merchat"` // 商户号
|
||||
Secret string `yaml:"secret"` // 商户密钥
|
||||
} `yaml:"playletMediaResourceDBCfg"`
|
||||
NewInnerStatUrl string `yaml:"newInnerStatUrl"`
|
||||
DataReport struct {
|
||||
Url string `yaml:"url"`
|
||||
} `yaml:"dataReport"`
|
||||
}
|
||||
|
||||
func IsDev() bool {
|
||||
return Conf.RunMod == "dev" || Conf.RunMod == "debug"
|
||||
}
|
||||
Reference in New Issue
Block a user