routers

package
v0.0.0-...-54b2aeb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 UsageText

func UsageText() 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL