1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

添加微信客服SDK (#436)

* 添加微信客服SDK

* polish:优化签名函数

* polish:优化注释内容

* polish:复用已有的Token以及CommonError,移除无用的输出

* polish:复用已有的消息加解密

* fix:修复错误信息被覆盖的问题

* polish:go fmt 文件
This commit is contained in:
Afeyer
2021-08-17 10:19:01 +08:00
committed by GitHub
parent fc1fc7e84e
commit 8ceabc2d0b
17 changed files with 1299 additions and 1 deletions

View File

@@ -5,11 +5,14 @@ import (
"github.com/silenceper/wechat/v2/cache"
)
// Config config for 企业微信
// Config for 企业微信
type Config struct {
CorpID string `json:"corp_id"` // corp_id
CorpSecret string `json:"corp_secret"` // corp_secret,如果需要获取会话存档实例当前参数请填写聊天内容存档的Secret可以在企业微信管理端--管理工具--聊天内容存档查看
AgentID string `json:"agent_id"` // agent_id
Cache cache.Cache
RasPrivateKey string // 消息加密私钥,可以在企业微信管理端--管理工具--消息加密公钥查看对用公钥,私钥一般由自己保存
Token string `json:"token"` // 微信客服回调配置,用于生成签名校验回调请求的合法性
EncodingAESKey string `json:"encoding_aes_key"` // 微信客服回调p配置用于解密回调消息内容对应的密文
}