This commit is contained in:
2025-07-28 01:46:39 +08:00
parent b03129667a
commit 357639462a
219 changed files with 21634 additions and 8138 deletions

View File

@@ -12,6 +12,7 @@ type Config struct {
Cache CacheConfig `mapstructure:"cache"`
Logger LoggerConfig `mapstructure:"logger"`
JWT JWTConfig `mapstructure:"jwt"`
API APIConfig `mapstructure:"api"`
SMS SMSConfig `mapstructure:"sms"`
Storage StorageConfig `mapstructure:"storage"`
OCR OCRConfig `mapstructure:"ocr"`
@@ -23,6 +24,12 @@ type Config struct {
App AppConfig `mapstructure:"app"`
WechatWork WechatWorkConfig `mapstructure:"wechat_work"`
Esign EsignConfig `mapstructure:"esign"`
Wallet WalletConfig `mapstructure:"wallet"`
WestDex WestDexConfig `mapstructure:"westdex"`
AliPay AliPayConfig `mapstructure:"alipay"`
Recharge RechargeConfig `mapstructure:"recharge"`
Yushan YushanConfig `mapstructure:"yushan"`
Domain DomainConfig `mapstructure:"domain"`
}
// ServerConfig HTTP服务器配置
@@ -141,6 +148,11 @@ type AppConfig struct {
Env string `mapstructure:"env"`
}
// APIConfig API配置
type APIConfig struct {
Domain string `mapstructure:"domain"`
}
// SMSConfig 短信配置
type SMSConfig struct {
AccessKeyID string `mapstructure:"access_key_id"`
@@ -218,11 +230,10 @@ type EsignConfig struct {
AppSecret string `mapstructure:"app_secret"` // 应用密钥
ServerURL string `mapstructure:"server_url"` // 服务器URL
TemplateID string `mapstructure:"template_id"` // 模板ID
Contract ContractConfig `mapstructure:"contract"` // 合同配置
Auth AuthConfig `mapstructure:"auth"` // 认证配置
Sign SignConfig `mapstructure:"sign"` // 签署配置
Notify NotifyConfig `mapstructure:"notify"` // 通知配置
}
// ContractConfig 合同配置
@@ -234,10 +245,11 @@ type ContractConfig struct {
// AuthConfig 认证配置
type AuthConfig struct {
OrgAuthModes []string `mapstructure:"org_auth_modes"` // 机构可用认证模式
DefaultAuthMode string `mapstructure:"default_auth_mode"` // 默认认证模式
PsnAuthModes []string `mapstructure:"psn_auth_modes"` // 个人可用认证模式
OrgAuthModes []string `mapstructure:"org_auth_modes"` // 机构可用认证模式
DefaultAuthMode string `mapstructure:"default_auth_mode"` // 默认认证模式
PsnAuthModes []string `mapstructure:"psn_auth_modes"` // 个人可用认证模式
WillingnessAuthModes []string `mapstructure:"willingness_auth_modes"` // 意愿认证模式
RedirectURL string `mapstructure:"redirect_url"` // 重定向URL
}
// SignConfig 签署配置
@@ -245,10 +257,46 @@ type SignConfig struct {
AutoFinish bool `mapstructure:"auto_finish"` // 是否自动完结
SignFieldStyle int `mapstructure:"sign_field_style"` // 签署区样式
ClientType string `mapstructure:"client_type"` // 客户端类型
RedirectURL string `mapstructure:"redirect_url"` // 重定向URL
}
// NotifyConfig 通知配置
type NotifyConfig struct {
Types string `mapstructure:"types"` // 通知类型
RedirectURL string `mapstructure:"redirect_url"` // 重定向URL
// WalletConfig 钱包配置
type WalletConfig struct {
DefaultCreditLimit float64 `mapstructure:"default_credit_limit"`
}
// WestDexConfig WestDex配置
type WestDexConfig struct {
URL string `mapstructure:"url"`
Key string `mapstructure:"key"`
SecretId string `mapstructure:"secret_id"`
SecretSecondId string `mapstructure:"secret_second_id"`
}
// AliPayConfig 支付宝配置
type AliPayConfig struct {
AppID string `mapstructure:"app_id"`
PrivateKey string `mapstructure:"private_key"`
AlipayPublicKey string `mapstructure:"alipay_public_key"`
IsProduction bool `mapstructure:"is_production"`
NotifyURL string `mapstructure:"notify_url"`
ReturnURL string `mapstructure:"return_url"`
}
// RechargeConfig 充值配置
type RechargeConfig struct {
MinAmount string `mapstructure:"min_amount"` // 最低充值金额
MaxAmount string `mapstructure:"max_amount"` // 最高充值金额
}
// YushanConfig 羽山配置
type YushanConfig struct {
URL string `mapstructure:"url"`
APIKey string `mapstructure:"api_key"`
AcctID string `mapstructure:"acct_id"`
}
// DomainConfig 域名配置
type DomainConfig struct {
API string `mapstructure:"api"` // API域名
}