微信相关能力
This commit is contained in:
@@ -23,6 +23,7 @@ type Config struct {
|
||||
JWT JWTConfig `mapstructure:"jwt"`
|
||||
DefaultAdmin DefaultAdminConfig `mapstructure:"default_admin"`
|
||||
Storage StorageConfig `mapstructure:"storage"`
|
||||
Wechat WechatConfig `mapstructure:"wechat"`
|
||||
}
|
||||
|
||||
// ServerConfig HTTP 服务器配置
|
||||
@@ -147,6 +148,35 @@ type PresignConfig struct {
|
||||
DownloadExpires time.Duration `mapstructure:"download_expires"` // 下载 URL 有效期(默认:24h)
|
||||
}
|
||||
|
||||
// WechatConfig 微信配置
|
||||
type WechatConfig struct {
|
||||
OfficialAccount OfficialAccountConfig `mapstructure:"official_account"`
|
||||
Payment PaymentConfig `mapstructure:"payment"`
|
||||
}
|
||||
|
||||
// OfficialAccountConfig 微信公众号配置
|
||||
type OfficialAccountConfig struct {
|
||||
AppID string `mapstructure:"app_id"`
|
||||
AppSecret string `mapstructure:"app_secret"`
|
||||
Token string `mapstructure:"token"`
|
||||
AESKey string `mapstructure:"aes_key"`
|
||||
OAuthRedirectURL string `mapstructure:"oauth_redirect_url"`
|
||||
}
|
||||
|
||||
// PaymentConfig 微信支付配置
|
||||
type PaymentConfig struct {
|
||||
AppID string `mapstructure:"app_id"`
|
||||
MchID string `mapstructure:"mch_id"`
|
||||
APIV3Key string `mapstructure:"api_v3_key"`
|
||||
APIV2Key string `mapstructure:"api_v2_key"`
|
||||
CertPath string `mapstructure:"cert_path"`
|
||||
KeyPath string `mapstructure:"key_path"`
|
||||
SerialNo string `mapstructure:"serial_no"`
|
||||
NotifyURL string `mapstructure:"notify_url"`
|
||||
HttpDebug bool `mapstructure:"http_debug"`
|
||||
Timeout time.Duration `mapstructure:"timeout"`
|
||||
}
|
||||
|
||||
type requiredField struct {
|
||||
value string
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user