12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- package config
- import (
- "app.yhyue.com/moapp/jybase/common"
- qrpc "app.yhyue.com/moapp/message/model"
- "github.com/gogf/gf/v2/frame/g"
- "github.com/gogf/gf/v2/os/gcfg"
- )
- type config struct {
- Nsq struct {
- Address string
- }
- Redis struct {
- Address string
- }
- Mongodb struct {
- Address string
- Size int
- DbName string
- ReplSet string
- UserName string
- Password string
- }
- Etcd struct {
- Hosts []string
- Key string
- }
- DocPoints struct {
- AppId string
- Open struct {
- Max int64
- Jyweb_article_open int64
- Jydocs_doc_open int64
- }
- Jywx_subscribe_new int64
- Jywx_subscribe_invite int64
- Jywx_subscribe_invited int64
- }
- }
- var (
- PushConfig *pushConfig
- )
- type LotteryReceiveReq struct {
- UserName string `json:"userName"`
- UserId string `json:"userId"`
- LotteryIdArr string `json:"lotteryIdArr"`
- }
- type pushConfig struct {
- Webdomain string `json:"webdomain"`
- Weixinrpc string `json:"weixinrpc"`
- PushPoolSize int `json:"pushPoolSize"`
- WxMsg struct {
- Id string
- First *qrpc.TmplItem
- Keyword1 *qrpc.TmplItem
- Keyword2 *qrpc.TmplItem
- Keyword3 *qrpc.TmplItem
- Keyword4 *qrpc.TmplItem
- Remark *qrpc.TmplItem
- } `json:"wxTplMsg"`
- TestId string `json:"testId"`
- DelayedTime int `json:"delayedTime"`
- Subvip string `json:"subvip"`
- Points string `json:"points"`
- FullReduce string `json:"fullReduce"`
- }
- //var Config *config
- func init() {
- //推送配置文件
- common.ReadConfig("./etc/push.json", &PushConfig)
- //系统配置文件
- //common.ReadConfig(&Config)
- g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("./etc/config.yaml")
- }
|