mindoc/conf/workweixin.go

28 lines
653 B
Go
Raw Normal View History

2022-05-07 18:06:46 +08:00
package conf
import (
"github.com/beego/beego/v2/server/web"
2022-05-07 18:06:46 +08:00
)
type WorkWeixinConf struct {
CorpId string // 企业ID
AgentId string // 应用ID
Secret string // 应用密钥
// ContactSecret string // 通讯录密钥
2022-05-07 18:06:46 +08:00
}
func GetWorkWeixinConfig() *WorkWeixinConf {
corpid, _ := web.AppConfig.String("workweixin_corpid")
agentid, _ := web.AppConfig.String("workweixin_agentid")
secret, _ := web.AppConfig.String("workweixin_secret")
// contact_secret, _ := web.AppConfig.String("workweixin_contact_secret")
2022-05-07 18:06:46 +08:00
c := &WorkWeixinConf{
CorpId: corpid,
AgentId: agentid,
Secret: secret,
// ContactSecret: contact_secret,
}
return c
2022-05-07 18:06:46 +08:00
}