1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- package config
- import (
- "github.com/zeromicro/go-zero/zrpc"
- )
- type Config struct {
- zrpc.RpcServerConf
- DataSource *mysqlConfig // 手动代码
- BaseSource *mysqlConfig // 手动代码
- Mysql string
- Redis *RedisConfig
- Mongodb *mgoConf
- SurvivalTime int
- SaveConcurrency int // 消息保存并发数
- WxTmplConfig WxTmplMsg `json:"WxTmplConfig"`
- }
- type RedisConfig struct {
- Host string
- Addr string
- Modules string
- }
- 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 {
- JySchool string `json:"jySchool"`
- System string `json:"system"`
- CloseNotice string `json:"closeNotice"`
- } `json:"tmplSetting"`
- Limit struct {
- Total int `json:"total"`
- PrivateMessage struct {
- OneDayLimit int `json:"oneDayLimit"`
- DuringMine int `json:"duringMine"`
- } `json:"privateMessage"`
- Alert struct {
- Nums []int `json:"nums"`
- Mail []string `json:"mail"`
- } `json:"alert"`
- } `json:"limit"`
- }
|