wx

package
v0.0.0-...-cb6f21f Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MapZiLiao  = make(map[string]string, 0)
	GuanJianCi = make(map[string]string, 0)
)

Functions

func Get

func Get(w http.ResponseWriter, r *http.Request)

func Post

func Post(w http.ResponseWriter, r *http.Request)

func WriteLog

func WriteLog(r *http.Request, t time.Time, match string, pattern string)

Types

type Base

type Base struct {
	FromUserName CDATAText
	ToUserName   CDATAText
	MsgType      CDATAText
	CreateTime   CDATAText
}

func (*Base) InitBaseData

func (b *Base) InitBaseData(w *WeixinClient, msgtype string)

type CDATAText

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

type HttpHandler

type HttpHandler struct{}

func (*HttpHandler) ServeHTTP

func (*HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TextMessage

type TextMessage struct {
	XMLName xml.Name `xml:"xml"`
	Base
	Content CDATAText
}

type WebController

type WebController struct {
	Function func(http.ResponseWriter, *http.Request)
	Method   string
	Pattern  string
}

type WeixinClient

type WeixinClient struct {
	Token          string
	Query          weixinQuery
	Message        map[string]interface{}
	Request        *http.Request
	ResponseWriter http.ResponseWriter
	Methods        map[string]func() bool
}

func NewClient

func NewClient(r *http.Request, w http.ResponseWriter, token string) (*WeixinClient, error)

func (*WeixinClient) Run

func (this *WeixinClient) Run()

Jump to

Keyboard shortcuts

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