diff --git a/config/share.yml b/config/share.yml index 2258e8778..c0e509e4b 100644 --- a/config/share.yml +++ b/config/share.yml @@ -1,13 +1,13 @@ env: zookeeper rpcRegisterName: - User: User - Friend: Friend - Msg: Msg - Push: Push - MessageGateway: MessageGateway - Group: Group - Auth: Auth - Conversation: Conversation - Third: Third + user: User + friend: Friend + msg: Msg + push: Push + messageGateway: MessageGateway + group: Group + auth: Auth + conversation: Conversation + third: Third diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 96f6e4a3a..ea853a693 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -323,6 +323,21 @@ type WebhookConfig struct { FailedContinue bool `mapstructure:"failedContinue"` } +type Share struct { + Env string `mapstructure:"env"` + RpcRegisterName struct { + User string `mapstructure:"user"` + Friend string `mapstructure:"friend"` + Msg string `mapstructure:"msg"` + Push string `mapstructure:"push"` + MessageGateway string `mapstructure:"messageGateway"` + Group string `mapstructure:"group"` + Auth string `mapstructure:"auth"` + Conversation string `mapstructure:"conversation"` + Third string `mapstructure:"third"` + } `mapstructure:"rpcRegisterName"` +} + type Webhooks struct { URL string `mapstructure:"url"` BeforeSendSingleMsg WebhookConfig `mapstructure:"beforeSendSingleMsg"` @@ -376,22 +391,10 @@ type Webhooks struct { } type ZooKeeper struct { - Schema string `mapstructure:"schema"` - Address []string `mapstructure:"address"` - Username string `mapstructure:"username"` - Password string `mapstructure:"password"` - Env string `mapstructure:"env"` - RpcRegisterName struct { - User string `mapstructure:"User"` - Friend string `mapstructure:"Friend"` - Msg string `mapstructure:"Msg"` - Push string `mapstructure:"Push"` - MessageGateway string `mapstructure:"MessageGateway"` - Group string `mapstructure:"Group"` - Auth string `mapstructure:"Auth"` - Conversation string `mapstructure:"Conversation"` - Third string `mapstructure:"Third"` - } `mapstructure:"rpcRegisterName"` + Schema string `mapstructure:"schema"` + Address []string `mapstructure:"address"` + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` } func (m *Mongo) Build() *mongoutil.Config {