wechat

package
v0.0.0-...-d6f0842 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValidation

func GetValidation(req *http.Request) (string, string, string)

func Marshal

func Marshal(to, from, timestamp, msgtype, content string) []byte

func ValidateServer

func ValidateServer(token, nonce, timestamp, signature string) bool

Types

type CDATAText

type CDATAText struct {
	Text string `xml:",innerxml"`
}

func CDATA

func CDATA(v string) CDATAText

type EncryptRequest

type EncryptRequest struct{}

type EncryptResponse

type EncryptResponse struct{}

type TextRequest

type TextRequest struct {
	XMLName      xml.Name `xml:"xml"`
	ToUserName   string
	FromUserName string
	CreateTime   string
	MsgType      string
	// text
	Content string
	// event
	Event    string
	EventKey string
	Tickey   string
	// Latitude  string
	// Longitude string
	// Precision string
	// image voice video shortvideo
	PicUrl       string
	MediaId      string
	Format       string
	Recognition  string
	ThumbMediaId string
	// location
	Location_X string
	Location_Y string
	Scale      string
	// link
	Title       string
	Description string
	Url         string
	MsgId       int64
}

func Parse

func Parse(data []byte) *TextRequest

type TextResponse

type TextResponse struct {
	XMLName      xml.Name `xml:"xml"`
	ToUserName   CDATAText
	FromUserName CDATAText
	CreateTime   string
	MsgType      CDATAText
	Content      CDATAText
}

Jump to

Keyboard shortcuts

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