1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- package config
- import (
- "github.com/zeromicro/go-zero/zrpc"
- )
- type Config struct {
- zrpc.RpcServerConf
- DataSource *mysqlConfig // 手动代码
- BaseSource *mysqlConfig // 手动代码
- WebRpcPort int
- Mysql string
- RedisAddr string `json:"RedisAddr"`
- Mongodb *mgoConf
- SurvivalTime int
- SaveConcurrency int // 消息保存并发数
- WxTmplConfig WxTmplMsg `json:"WxTmplConfig"`
- Mail []struct {
- Addr string `json:"addr"`
- Port int `json:"port"`
- Pwd string `json:"pwd"`
- User string `json:"user"`
- } `json:"mail"`
- }
- type mysqlConfig struct {
- DbName string
- Address string
- UserName string
- PassWord string
- MaxOpenConns int
- MaxIdleConns int
- }
- type mgoConf struct {
- Address string
- Size int
- DbName string
- ReplSet string
- UserName string
- Password string
- Collection string
- Collection_back string
- }
- var ConfigJson Config
- type WxTmplMsg struct {
- RpcAddr string `json:"rpcAddr"`
- TmplSetting struct {
- JySchoolTmplId string `json:"jySchoolTmplId"`
- SystemTmplId string `json:"systemTmplId"`
- CloseNotice string `json:"closeNotice"`
- } `json:"tmplSetting"`
- Limit struct {
- Total int `json:"total"`
- OneDayLimit int `json:"oneDayLimit"`
- DuringMine int `json:"duringMine"`
- Alert struct {
- Nums []int64 `json:"nums"`
- ToMail []string `json:"toMail"`
- CcMail []string `json:"ccMail"`
- } `json:"alert"`
- } `json:"limit"`
- }
|