Files
exchange_go/config/extend.go

89 lines
2.7 KiB
Go
Raw Normal View History

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"`
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"` // 收件地址
}
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"`
}
2025-10-14 19:58:59 +08:00
/**
* Binance配置结构体
*/
type BinanceConfig struct {
ApiKey string `json:"apiKey" mapstructure:"apiKey"` // API密钥
ApiSecret string `json:"apiSecret" mapstructure:"apiSecret"` // API密钥
ProxyType string `json:"proxyType" mapstructure:"proxyType"` // 代理类型
ProxyAddress string `json:"proxyAddress" mapstructure:"proxyAddress"` // 代理地址
TestNet bool `json:"testNet" mapstructure:"testNet"` // 是否使用测试网
}