public

package
v0.0.0-...-d10c483 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDATA

type CDATA string

func (CDATA) MarshalXML

func (c CDATA) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type IReplyMsg

type IReplyMsg interface {
	GetBaseInfo() *xmlReplyBaseMessage
}

type WXProcessor

type WXProcessor interface {
	OnEvent(event XMLEvent) IReplyMsg                    //事件响应
	OnMessage(msgtype string, msg interface{}) IReplyMsg //消息响应
}

消息处理接口,用于实现应用自身的逻辑

type WXPublicApplication

type WXPublicApplication struct {
	Token  string `Value:"wx.public.token"`
	AppId  string `Value:"wx.public.appid"`
	AESKey string `Value:"wx.public.aeskey"`
	mvc.SimpleController

	Processor WXProcessor `Inject:"processor"` //处理器
	// contains filtered or unexported fields
}

func (*WXPublicApplication) Get

func (this *WXPublicApplication) Get(c mvc.Context, p interface{}) (interface{}, mvc.BingoError)

func (*WXPublicApplication) GetParameType

func (this *WXPublicApplication) GetParameType(method string) interface{}

func (*WXPublicApplication) GetUrl

func (this *WXPublicApplication) GetUrl() string

func (*WXPublicApplication) Init

func (this *WXPublicApplication) Init()

func (*WXPublicApplication) Post

func (this *WXPublicApplication) Post(c mvc.Context, p interface{}) (interface{}, mvc.BingoError)

正常的访问消息处理

type WXxmlImageMessage

type WXxmlImageMessage struct {
	XMLName xml.Name `xml:"xml"`

	PicUrl  string //图片路径
	MediaId string //媒体id
	// contains filtered or unexported fields
}

图片消息

type WXxmlLinkMessage

type WXxmlLinkMessage struct {
	XMLName xml.Name `xml:"xml"`

	Title       string //标题
	Description string //描述
	Url         string //封面缩略图的url
	// contains filtered or unexported fields
}

连接消息

type WXxmlLocationMessage

type WXxmlLocationMessage struct {
	XMLName xml.Name `xml:"xml"`

	X     float64 `xml:"Location_X"` //地理位置纬度
	Y     float64 `xml:"Location_Y"` //地理位置经度
	Scale int64   //地图缩放大小
	Label string  //地理位置信息
	// contains filtered or unexported fields
}

地址消息

type WXxmlReplyArticleMessage

type WXxmlReplyArticleMessage struct {
	XMLName xml.Name `xml:"xml"`

	Content xmlReplyArticlesContent
	// contains filtered or unexported fields
}

图文

func (*WXxmlReplyArticleMessage) GetBaseInfo

func (this *WXxmlReplyArticleMessage) GetBaseInfo() *xmlReplyBaseMessage

type WXxmlReplyImageMessage

type WXxmlReplyImageMessage struct {
	XMLName xml.Name `xml:"xml"`

	Content xmlReplyImageContent
	// contains filtered or unexported fields
}

func (*WXxmlReplyImageMessage) GetBaseInfo

func (this *WXxmlReplyImageMessage) GetBaseInfo() *xmlReplyBaseMessage

type WXxmlReplyMusicMessage

type WXxmlReplyMusicMessage struct {
	XMLName xml.Name `xml:"xml"`

	Content xmlReplyMusicContent
	// contains filtered or unexported fields
}

音乐

func (*WXxmlReplyMusicMessage) GetBaseInfo

func (this *WXxmlReplyMusicMessage) GetBaseInfo() *xmlReplyBaseMessage

type WXxmlReplyTextMessage

type WXxmlReplyTextMessage struct {
	XMLName xml.Name `xml:"xml"`

	Content CDATA
	// contains filtered or unexported fields
}

文本回复消息

func (*WXxmlReplyTextMessage) GetBaseInfo

func (this *WXxmlReplyTextMessage) GetBaseInfo() *xmlReplyBaseMessage

type WXxmlReplyVideoMessage

type WXxmlReplyVideoMessage struct {
	XMLName xml.Name `xml:"xml"`

	Content xmlReplyVideoContent
	// contains filtered or unexported fields
}

视频

func (*WXxmlReplyVideoMessage) GetBaseInfo

func (this *WXxmlReplyVideoMessage) GetBaseInfo() *xmlReplyBaseMessage

type WXxmlReplyVoiceMessage

type WXxmlReplyVoiceMessage struct {
	XMLName xml.Name `xml:"xml"`

	Content xmlReplyVoiceContent
	// contains filtered or unexported fields
}

语音

func (*WXxmlReplyVoiceMessage) GetBaseInfo

func (this *WXxmlReplyVoiceMessage) GetBaseInfo() *xmlReplyBaseMessage

type WXxmlTextMessage

type WXxmlTextMessage struct {
	XMLName xml.Name `xml:"xml"`

	Content string
	// contains filtered or unexported fields
}

文本消息

type WXxmlVideoMessage

type WXxmlVideoMessage struct {
	XMLName xml.Name `xml:"xml"`

	MediaId      string //视频媒体文件id,可以调用获取媒体文件接口拉取数据,仅三天内有效
	ThumbMediaId string //视频消息缩略图的媒体id,可以调用获取媒体文件接口拉取数据,仅三天内有效
	// contains filtered or unexported fields
}

视频/小视频消息

type WXxmlVoiceMessage

type WXxmlVoiceMessage struct {
	XMLName xml.Name `xml:"xml"`

	MediaId string //媒体id
	Format  string //文件格式
	// contains filtered or unexported fields
}

语音消息

type XMLEvent

type XMLEvent struct {
	XMLName      xml.Name `xml:"xml"`
	FromUserName string
	ToUserName   string
	CreateTime   int64
	MsgType      string //事件类型,subscribe(订阅)、unsubscribe(取消订阅),SCAN(扫描二维码)
	//如果用户已经关注事件类型,SCAN,未关注时候类型为subscribe
	//	事件类型,跳转 VIEW,菜单点击 CLICK
	Event string

	EventKey string //事件KEY值,qrscene_为前缀,后面为二维码的参数值;VIEW和CLICK时候,与自定义菜单接口中KEY值对应|事件KEY值,设置的跳转URL

	Ticket string //二维码的ticket,可用来换取二维码图片
	//	事件类型,LOCATION
	Latitude  float64 //地理位置纬度
	Longitude float64 //地理位置经度
	Precision float64 //地理位置精度
}

事件

Jump to

Keyboard shortcuts

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