Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InteractEntry ¶
func InteractEntry(wxcfg *wechat.WxConfig, req *MsgRequestData, handler MsgHandler) (interface{}, error)
InteractEntry the entry of user and public account server interactive with each other
return reply message
Types ¶
type MsgHandler ¶
type MsgHandler func(*message.MixMessage) (*message.Reply, error)
type MsgRequestData ¶
type MsgRequestData struct { OpenID string `json:"openid"` Nonce string `json:"nonce"` Signature string `json:"signature"` Timestamp string `json:"timestamp"` // echostr 随机字符串, 用于校验开发者接入是否成功 // 若确认此次GET请求来自微信服务器,请原样返回echostr参数内容,则接入生效,否则接入失败 EchoStr string `json:"echostr"` EchoStrExist bool `json:"echostr_exist"` // encrypt_type == aes SafeMode bool Random []byte // input message data InputMixMsg *message.MixMessage }
MsgRequestData struct of request
func ParseRequestFromGin ¶
func ParseRequestFromGin(c *gin.Context, wxcfg *wechat.WxConfig, needCheckSign bool) (*MsgRequestData, error)
ParseRequestFromGin parse message from gin's request
Click to show internal directories.
Click to hide internal directories.