wechatgogin

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 15 Imported by: 0

README

wechat-go-gin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildResponse

func BuildResponse(ginWxMsg *GinWxMsg) (err error)

编译响应参数

func Render

func Render(c *gin.Context, bytes []byte)

func Result

func Result(ginWxMsg *GinWxMsg) (err error)

func ResultXml

func ResultXml(c *gin.Context, obj interface{})

func ReulstString

func ReulstString(c *gin.Context, str string)

func Validate

func Validate(ginWxMsg *GinWxMsg) bool

Validate 校验请求是否合法

Types

type GinWxMsg

type GinWxMsg struct {
	Gin           *gin.Context
	WxCtx         *context.Context
	MixMessage    *message.MixMessage
	IsSafeMode    bool
	IsJSONContent bool
	Random        []byte
	Nonce         string
	Timestamp     int64

	SkipValidate bool

	OpenID string

	MessageReply *message.Reply

	RequestRawXMLMsg  []byte
	RequestMsg        *message.MixMessage
	ResponseRawXMLMsg []byte
	ResponseMsg       interface{}
}

gin 微信消息

func GetWxMsg

func GetWxMsg(c *gin.Context, wxCtx *context.Context, skip bool) (ginWxMsg *GinWxMsg, err error)

gin 获取微信消息

Jump to

Keyboard shortcuts

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