package config

// RedisOpts redis 连接属性
type WechatOpts struct {
	Appid  string
	Secret string
}
type WechatConfig struct {
	BaseConfig
	opts WechatOpts
}

func (w *WechatConfig) GetConfig() interface{} {
	return w.opts
}
func (w *WechatConfig) InitConfig() {
	opts := WechatOpts{
		Appid:  w.GetString("appid"),
		Secret: w.GetString("secret"),
	}
	w.opts = opts
}
func NewWechat() Config {
	return &WechatConfig{
		BaseConfig: BaseConfig{prefix: "wechat"},
		opts:       WechatOpts{},
	}
}

func init() {
	Register("wechat", NewWechat)
}