package config import ( "chainweaver.org.cn/chainweaver/servicecommon/gorm" "github.com/zeromicro/go-zero/rest" gorm2 "gorm.io/gorm" ) var ( ConfigIns = &Config{} DB = &gorm2.DB{} ) type Config struct { DatabaseConfig *DatabaseConf `mapstructure:"Database" json:"Database"` Cache gorm.CacheConf `json:",optional"` rest.RestConf Service *Service `mapstructure:"service" json:"Service"` EnterpriseConfig *EnterpriseConfig `mapstructure:"enterprise" json:"enterpriseConfig"` AuthService *AuthService `mapstructure:"authService" json:"authService"` // 电子营业执照认证 Jwt *Jwt `mapstructure:"jwt" json:"jwt"` IsOperatorCenter int `mapstructure:"is_operator_center" json:"isOperatorCenter"` } type DatabaseConf struct { DSN string `mapstructure:"dsn" json:"DSN"` DbType string `mapstructure:"dbtype" json:"DbType"` } // 企业实名认证查询 type EnterpriseConfig struct { Proxy string `mapstructure:"proxy" json:"proxy"` // 代理服务器IP UrlAddr string `mapstructure:"urlAddr" json:"urlAddr"` // 企业实名认证url AccessKey string `mapstructure:"accessKey" json:"accessKey"` // 服务商分配的accessKey AppId string `mapstructure:"appId" json:"appId"` // 服务商分配的appid } type AuthService struct { Url string `mapstructure:"url" json:"url"` Proxy string `mapstructure:"proxy" json:"proxy"` // 代理服务器IP SysCode string `mapstructure:"sys_code" json:"sysCode"` AuthCode string `mapstructure:"auth_code" json:"authCode"` Sign string `mapstructure:"sign" json:"sign"` Version string `mapstructure:"version" json:"version"` }