Documentation ¶
Index ¶
- type AccountParam
- func (p *AccountParam) GetParam(body []byte) (*AccountParam, string)
- func (p *AccountParam) TransmitImage(content string) string
- func (p *AccountParam) TransmitMusic(content map[string]string) string
- func (p *AccountParam) TransmitNews(content []map[string]string, count int) string
- func (p *AccountParam) TransmitText(content string) string
- func (p *AccountParam) TransmitVideo(content map[string]string) string
- func (p *AccountParam) TransmitVoice(content string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountParam ¶
type AccountParam struct { //binding:"required"修饰的字段,若接收为空值,则报错,是必须字段 Signature string `form:"signature" xml:"signature" binding:"required"` //微信加密签名 Timestamp string `form:"timestamp" xml:"timestamp" binding:"required"` //时间戳 Nonce string `form:"nonce" xml:"nonce" binding:"required"` //随机数 Echostr string `form:"echostr"` //随机字符串 XmlBody *xmlBody //xml消息内容体 // contains filtered or unexported fields }
定义接收数据的结构体
func (*AccountParam) GetParam ¶
func (p *AccountParam) GetParam(body []byte) (*AccountParam, string)
获取参数及请求内容
func (*AccountParam) TransmitImage ¶
func (p *AccountParam) TransmitImage(content string) string
回复图片消息
func (*AccountParam) TransmitMusic ¶
func (p *AccountParam) TransmitMusic(content map[string]string) string
回复音乐消息
func (*AccountParam) TransmitNews ¶
func (p *AccountParam) TransmitNews(content []map[string]string, count int) string
回复图文消息,目前微信只支持一组图文
func (*AccountParam) TransmitText ¶
func (p *AccountParam) TransmitText(content string) string
回复文本消息
func (*AccountParam) TransmitVideo ¶
func (p *AccountParam) TransmitVideo(content map[string]string) string
回复视频消息
func (*AccountParam) TransmitVoice ¶
func (p *AccountParam) TransmitVoice(content string) string
回复语音消息
Click to show internal directories.
Click to hide internal directories.