12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- 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"`
- CloseNotice string `json:"closeNotice"`
- 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"`
- }
|