Documentation ¶
Index ¶
- func EventHub(w http.ResponseWriter, um *UserMessage)
- func ImageHub(w http.ResponseWriter, um *UserMessage)
- func PostMessage(w http.ResponseWriter, r *http.Request)
- func TextHub(w http.ResponseWriter, um *UserMessage)
- func ThanksForYourMessage() string
- func UsageText() string
- func WeiChatValidate(w http.ResponseWriter, r *http.Request)
- type UserMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventHub ¶
func EventHub(w http.ResponseWriter, um *UserMessage)
func ImageHub ¶
func ImageHub(w http.ResponseWriter, um *UserMessage)
func PostMessage ¶
func PostMessage(w http.ResponseWriter, r *http.Request)
func TextHub ¶
func TextHub(w http.ResponseWriter, um *UserMessage)
func ThanksForYourMessage ¶
func ThanksForYourMessage() string
func WeiChatValidate ¶
func WeiChatValidate(w http.ResponseWriter, r *http.Request)
Types ¶
type UserMessage ¶
type UserMessage struct { XMLName xml.Name `xml:"xml"` ToUserName string `xml:"ToUserName"` FromUserName string `xml:"FromUserName"` CreateTime int `xml:"CreateTime"` MsgType string `xml:"MsgType"` PicUrl string `xml:"PicUrl"` Content string `xml:"Content"` Event string `xml:"Event"` MsgId string `xml:"MsgId"` MediaId string `xml:MediaId` }
func (*UserMessage) ResponseUser ¶
func (um *UserMessage) ResponseUser()
ResponseUser 发送响应消息给用户:将消息中的from 和 to user 进行对调,并添加时间戳及传递的内容
func (*UserMessage) ResponseUserWithContent ¶
func (um *UserMessage) ResponseUserWithContent(text string)
Click to show internal directories.
Click to hide internal directories.