2025-02-06 11:14:33 +08:00
|
|
|
|
package config
|
|
|
|
|
|
|
|
|
|
|
|
var ExtConfig Extend
|
|
|
|
|
|
|
|
|
|
|
|
// Extend 扩展配置
|
|
|
|
|
|
//
|
|
|
|
|
|
// extend:
|
|
|
|
|
|
// demo:
|
|
|
|
|
|
// name: demo-name
|
|
|
|
|
|
//
|
|
|
|
|
|
// 使用方法: config.ExtConfig......即可!!
|
|
|
|
|
|
type Extend struct {
|
|
|
|
|
|
AMap AMap // 这里配置对应配置文件的结构即可
|
|
|
|
|
|
Redis RedisConfig `mapstructure:"redis"`
|
|
|
|
|
|
ServiceId int64 `mapstructure:"serviceId"` //雪花算法id(服务id,比如1,2,3等,当多机部署需定义唯一id)
|
|
|
|
|
|
EmailConfig EmailConfig `mapstructure:"emailConfig"`
|
|
|
|
|
|
BinanceSet BinanceConfig `mapstructure:"binanceSet"` //binance配置
|
|
|
|
|
|
Domain string //网站域名
|
|
|
|
|
|
UDunConfig UDunConfig `mapstructure:"UDunConfig"`
|
|
|
|
|
|
ProxyUrl string //代理地址
|
|
|
|
|
|
CoinGate CoinGateConfig `mapstructure:"coingate"` //coingate钱包
|
2025-03-21 20:44:35 +08:00
|
|
|
|
GoToneSmsConfig GoToneSmsConfig `mapstructure:"GoToneSmsConfig"`
|
|
|
|
|
|
InnoPaas InnoPaasConfig `mapstructure:"innoPaas"` //创蓝短信
|
2025-02-06 11:14:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type CoinGateConfig struct {
|
|
|
|
|
|
Auth string
|
|
|
|
|
|
//接口地址
|
|
|
|
|
|
Endpoint string
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type AMap struct {
|
|
|
|
|
|
Key string
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// redis配置
|
|
|
|
|
|
type RedisConfig struct {
|
|
|
|
|
|
Addr string
|
|
|
|
|
|
Password string
|
|
|
|
|
|
Db int
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// EmailConfig 邮件验证码配置
|
|
|
|
|
|
type EmailConfig struct {
|
|
|
|
|
|
MailSmtpHost string `json:"mail_smtp_host"` // 邮件服务
|
|
|
|
|
|
MailSmtpPort string `json:"mail_smtp_port"` // 端口
|
|
|
|
|
|
MailSmtpUser string `json:"mail_smtp_user"` // 发件地址
|
|
|
|
|
|
MailFrom string `json:"mail_from"` // 发件人
|
|
|
|
|
|
MailSmtpPass string `json:"mail_smtp_pass"` // 秘钥
|
|
|
|
|
|
MailVerifyType string `json:"mail_verify_type"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// EmailSend 邮件发送配置
|
|
|
|
|
|
type EmailSend struct {
|
|
|
|
|
|
EmailConfig
|
|
|
|
|
|
Subject string `json:"subject"` // 主题
|
|
|
|
|
|
Content string `json:"content"` // 内容
|
|
|
|
|
|
To string `json:"to"` // 收件地址
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// BinanceConfig 币安路由配置
|
|
|
|
|
|
type BinanceConfig struct {
|
|
|
|
|
|
SpotRestURL string
|
|
|
|
|
|
FutRestURL string
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type GoToneSmsConfig struct {
|
|
|
|
|
|
SenderId string `json:"sender_id"`
|
|
|
|
|
|
APIEndpoint string `json:"api_endpoint"`
|
|
|
|
|
|
Authorization string `json:"authorization"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-21 20:44:35 +08:00
|
|
|
|
type InnoPaasConfig struct {
|
|
|
|
|
|
Url string `json:"url"`
|
|
|
|
|
|
ApiKey string `json:"apiKey"`
|
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-02-06 11:14:33 +08:00
|
|
|
|
type UDunConfig struct {
|
|
|
|
|
|
UDunUrl string `json:"UDunUrl"`
|
|
|
|
|
|
UDunMerchantID string `json:"UDunMerchantID"`
|
|
|
|
|
|
UDunKey string `json:"UDunKey"`
|
|
|
|
|
|
CurrServerIp string `json:"CurrServerIp"`
|
|
|
|
|
|
}
|