package config type Config struct { Log Log `mapstructure:"log" json:"log" yaml:"log"` Serve Serve `mapstructure:"serve" json:"serve" yaml:"serve"` Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"` Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"` OracleJY OracleJY `mapstructure:"oracle_jy" json:"oracle_jy" yaml:"oracle_jy"` Business Business `mapstructure:"business" json:"business" yaml:"business"` Smm Smm `mapstructure:"smm" json:"smm" yaml:"smm"` Xiangyu Xiangyu `mapstructure:"xiangyu" json:"xiangyu" yaml:"xiangyu"` PCSG PCSG `mapstructure:"pcsg" json:"pcsg" yaml:"pcsg"` HTFutures HTFutures `mapstructure:"htFutures" json:"htFutures" yaml:"htFutures"` } // Serve gin服务配置 type Serve struct { Port int `mapstructure:"port" json:"port" yaml:"port" description:"gin开启监听http服务的端口"` RunMode string `mapstructure:"run-mode" json:"run-mode" yaml:"run-mode" description:"gin运行模式的默认,枚举值:debug,release"` UseRedis bool `mapstructure:"use-redis" json:"use-redis" yaml:"use-redis" description:"是否使用redis"` AppName string `mapstructure:"app-name" json:"app-name" yaml:"app-name" description:"项目名称"` StaticDir string `mapstructure:"static-dir" json:"static-dir" yaml:"static-dir" description:"上传的文件存储目录地址"` AppNameEn string `mapstructure:"app-name-en" json:"app-name-en" yaml:"app-name-en" description:"项目名称英文"` Md5Key string `mapstructure:"md5-key" json:"md5-key" yaml:"md5-key" description:"Md5密钥"` DesKey string `mapstructure:"des-key" json:"des-key" yaml:"des-key" description:"Des密钥"` IsStopTask bool `mapstructure:"is-stop-task" json:"is-stop-task" yaml:"is-stop-task" description:"是否停止任务,此功能用于多服务器部署时,定时任务只需一台服务器执行,其他服务器不执行的情况下设置为true"` } // Log 日志配置 type Log struct { Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix" description:"日志输出前缀"` LogFile bool `mapstructure:"log-file" json:"logFile" yaml:"log-file" description:""` Stdout string `mapstructure:"stdout" json:"stdout" yaml:"stdout" description:""` FileStdout string `mapstructure:"file-stdout" json:"file-stdout" yaml:"file-stdout" description:""` SaveMaxDay int `mapstructure:"save-max-day" json:"save-max-day" yaml:"save-max-day" description:"最多保留多少天的日志"` CuttingDay int `mapstructure:"cutting-day" json:"cutting-day" yaml:"cutting-day" description:"相隔几天切割文件"` LogDirPath string `mapstructure:"log-dir-path" json:"log-dir-path" yaml:"log-dir-path" description:"日志目录"` LogSoftLink string `mapstructure:"log-soft-link" json:"log-soft-link" yaml:"log-soft-link" description:"日志软链接"` BinlogDirPath string `mapstructure:"binlog-dir-path" json:"binlog-dir-path" yaml:"binlog-dir-path" description:"binlog日志目录"` BinlogSoftLink string `mapstructure:"binlog-soft-link" json:"binlog-soft-link" yaml:"binlog-soft-link" description:"binlog日志软链接"` FilelogDirPath string `mapstructure:"filelog-dir-path" json:"filelog-dir-path" yaml:"filelog-dir-path" description:"用户自主记录的日志目录"` FilelogSoftLink string `mapstructure:"filelog-soft-link" json:"filelog-soft-link" yaml:"filelog-soft-link" description:"用户自主记录的日志软链接"` } // Mysql 数据库配置 type Mysql struct { //LogMode bool `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode" description:"是否开启日志"` Stdout bool `mapstructure:"stdout" json:"stdout" yaml:"stdout" description:"日志是否输出在控制台"` DefaultDsnAliasName string `mapstructure:"default-dsn-alias-name" json:"default-dsn-alias-name" yaml:"default-dsn-alias-name" description:"默认的数据库连接别名"` List []MysqlConn `mapstructure:"list" json:"list" yaml:"list" description:"数据库链接配置列表"` Binlog Binlog `mapstructure:"binlog" json:"binlog" yaml:"binlog" description:"mysql binlog配置"` } type Binlog struct { IsListen bool `mapstructure:"is-listen" json:"is-listen" yaml:"is-listen" description:"是否监听mysql binlog"` ServerID uint32 `mapstructure:"server-id" json:"server-id" yaml:"server-id" description:"mysql binlog server id" default:"10000"` LogSaveDay int `mapstructure:"log-save-day" json:"log-save-day" yaml:"log-save-day" description:"更新日志保存天数" default:"10"` Host string `mapstructure:"host" json:"host" yaml:"host" description:"mysql binlog地址"` User string `mapstructure:"user" json:"user" yaml:"user" description:"mysql binlog用户名"` Password string `mapstructure:"password" json:"password" yaml:"password" description:"mysql binlog密码"` Db string `mapstructure:"db" json:"db" yaml:"db" description:"mysql binlog数据库"` } // MysqlConn mysql数据链接配置 type MysqlConn struct { Dsn string `mapstructure:"dsn" json:"dsc" yaml:"dsn" description:"数据库连接配置"` AliasName string `mapstructure:"alias-name" json:"alias-name" yaml:"alias-name" description:"数据库别名"` MaxIdleConns int `mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns" description:"最大空闲连接"` MaxOpenConns int `mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns" description:"最大连接数"` } // Redis redis配置 type Redis struct { Address string `mapstructure:"address" json:"address" yaml:"address" description:"redis服务链接地址"` Password string `mapstructure:"password" json:"password" yaml:"password" description:"redis服务密码"` Db int `mapstructure:"db" json:"db" yaml:"db" description:"默认使用的redis库"` ServeType string `mapstructure:"serve-type" json:"serve-type" yaml:"serve-type" description:"redis服务类型,单机或者cluster;默认单机"` } // OracleJY 嘉悦物产数据库配置 type OracleJY struct { Conn string `mapstructure:"conn" json:"conn" yaml:"conn" description:"服务链接地址"` Account string `mapstructure:"account" json:"account" yaml:"account" description:"oracle数据库账号"` Password string `mapstructure:"password" json:"password" yaml:"password" description:"oracle数据库密码"` LibDir string `mapstructure:"lib_dir" json:"lib_dir" yaml:"lib_dir" description:"oracle数据库组件"` } // Business 商家的配置 type Business struct { JiaYueIndexSyncMinute int `mapstructure:"jiayue-index-sync-minute" json:"jiayue-index-sync-minute" yaml:"jiayue-index-sync-minute" description:"嘉悦同步N分钟前至现在的指标(负数)"` } // Smm smm配置 type Smm struct { Username string `mapstructure:"username" json:"username" yaml:"username" description:"smm账号"` Password string `mapstructure:"password" json:"password" yaml:"password" description:"smm密码"` } // Xiangyu 象屿的配置 type Xiangyu struct { SystemCode string `mapstructure:"system-code" json:"system-code" yaml:"system-code" description:"系统编码"` UserSyncTarget string `mapstructure:"user-sync-target" json:"user-sync-target" yaml:"user-sync-target" description:"用户同步平台编码"` UserSyncHost string `mapstructure:"user-sync-host" json:"user-sync-host" yaml:"user-sync-host" description:"用户同步平台地址"` UserAuthHost string `mapstructure:"user-auth-host" json:"user-auth-host" yaml:"user-auth-host" description:"用户认证平台地址"` UserSyncAuthUserName string `mapstructure:"user-sync-auth-user-name" json:"user-sync-auth-user-name" yaml:"user-sync-auth-user-name" description:"用户统一身份的鉴权username"` UserSyncAuthPwd string `mapstructure:"user-sync-auth-pwd" json:"user-sync-auth-pwd" yaml:"user-sync-auth-pwd" description:"用户统一身份的鉴权password"` UserKey string `mapstructure:"user-key" json:"user-key" yaml:"user-key" description:"统一平台秘钥"` DefaultRoleId int `mapstructure:"default-role-id" json:"default-role-id" yaml:"default-role-id" description:"默认的角色id"` IndexSyncHost string `mapstructure:"index-sync-host" json:"index-sync-host" yaml:"index-sync-host" description:"指标同步平台地址"` IndexSyncAuthUserName string `mapstructure:"index-sync-auth-user-name" json:"index-sync-auth-user-name" yaml:"index-sync-auth-user-name" description:"用户统一身份的鉴权username"` IndexSyncAuthPwd string `mapstructure:"index-sync-auth-pwd" json:"index-sync-auth-pwd" yaml:"index-sync-auth-pwd" description:"用户统一身份的鉴权password"` IndexKey string `mapstructure:"index-key" json:"index-key" yaml:"index-key" description:"统一平台秘钥"` IndexSyncTarget string `mapstructure:"index-sync-target" json:"index-sync-target" yaml:"index-sync-target" description:"指标同步平台编码"` IndexCrmHost string `mapstructure:"index-crm-host" json:"index-crm-host" yaml:"index-crm-host" description:"crm指标平台地址"` IndexCrmTarget string `mapstructure:"index-crm-target" json:"index-crm-target" yaml:"index-crm-target" description:"crm指标平台编码"` } // 海通的配置 type HTFutures struct { APIAuth bool `mapstructure:"api-auth" json:"api-auth" yaml:"api-auth" description:"海通SSO登录签名认证"` PrivateKeyPemPath string `mapstructure:"private-key-pem-path" json:"private-key-pem-path" yaml:"private-key-pem-path" description:"私钥文件目录"` SSOAuthHost string `mapstructure:"sso-auth-host" json:"sso-auth-host" yaml:"sso-auth-host" description:"用户认证平台地址"` OaDBDns string `mapstructure:"oa-db-dns" json:"oa-db-dns" yaml:"oa-db-dns" description:"OA数据库连接地址"` OaDBDnsOrm string `mapstructure:"oa-db-dns-orm" json:"oa-db-dns-orm" yaml:"oa-db-dns-orm" description:"OA数据库连接地址-orm"` SyncTask SyncTask `mapstructure:"sync-task" json:"sync-task" yaml:"sync-task" description:"同步任务"` //UserKey string `mapstructure:"user-key" json:"user-key" yaml:"user-key" description:"统一平台秘钥"` //DefaultRoleId int `mapstructure:"default-role-id" json:"default-role-id" yaml:"default-role-id" description:"默认的角色id"` //IndexSyncHost string `mapstructure:"index-sync-host" json:"index-sync-host" yaml:"index-sync-host" description:"指标同步平台地址"` //IndexSyncAuthUserName string `mapstructure:"index-sync-auth-user-name" json:"index-sync-auth-user-name" yaml:"index-sync-auth-user-name" description:"用户统一身份的鉴权username"` //IndexSyncAuthPwd string `mapstructure:"index-sync-auth-pwd" json:"index-sync-auth-pwd" yaml:"index-sync-auth-pwd" description:"用户统一身份的鉴权password"` //IndexKey string `mapstructure:"index-key" json:"index-key" yaml:"index-key" description:"统一平台秘钥"` //IndexSyncTarget string `mapstructure:"index-sync-target" json:"index-sync-target" yaml:"index-sync-target" description:"指标同步平台编码"` //IndexCrmHost string `mapstructure:"index-crm-host" json:"index-crm-host" yaml:"index-crm-host" description:"crm指标平台地址"` //IndexCrmTarget string `mapstructure:"index-crm-target" json:"index-crm-target" yaml:"index-crm-target" description:"crm指标平台编码"` } type SyncTask struct { EnableTask bool `mapstructure:"enable-task" json:"enable-task" yaml:"enable-task" description:"是否启动同步任务"` SyncTaskInterval int `mapstructure:"sync-task-interval" json:"sync-task-interval" yaml:"sync-task-interval" description:"定时任务时间间隔"` SyncRoleId int `mapstructure:"sync_role_id" json:"sync_role_id" yaml:"sync_role_id" description:"同步用户角色id"` } type PCSG struct { BloombergApiUrl string `mapstructure:"bloomberge-api-url" json:"bloomberge-api-url" yaml:"bloomberge-api-url" description:"彭博API服务地址"` }