Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(wechat WechatSection)
Types ¶
type AccessToken ¶
type AccessToken struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` Err ExpiresInTime time.Time }
AccessToken 微信企业号请求Token
type Client ¶
type Client struct { CorpID string AgentID int AgentSecret string Token AccessToken }
Client 微信企业号应用配置信息
type Message ¶
type Message struct { ToUser string `json:"touser"` ToParty string `json:"toparty"` ToTag string `json:"totag"` MsgType string `json:"msgtype"` AgentID int `json:"agentid"` Text Content `json:"text"` }
Message 消息主体参数
type Result ¶
type Result struct { Err InvalidUser string `json:"invaliduser"` InvalidParty string `json:"infvalidparty"` InvalidTag string `json:"invalidtag"` }
Result 发送消息返回结果
type WechatSection ¶
type WechatSection struct { CorpID string `yaml:"corp_id"` AgentID int `yaml:"agent_id"` Secret string `yaml:"secret"` }
var WeChat WechatSection
Click to show internal directories.
Click to hide internal directories.