server

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*context.Context
	Writer  http.ResponseWriter
	Request *http.Request

	RequestRawXMLMsg  []byte
	RequestMsg        *message.MixMessage
	ResponseRawXMLMsg []byte
	ResponseMsg       interface{}
	// contains filtered or unexported fields
}

Server struct

func NewServer

func NewServer(context *context.Context) *Server

NewServer init

func (*Server) GetMessage

func (srv *Server) GetMessage() (*message.MixMessage, error)

getMessage 解析微信返回的消息

func (*Server) GetQuery

func (srv *Server) GetQuery(key string) (string, bool)

GetQuery is like Query(), it returns the keyed url query value

func (*Server) Query

func (srv *Server) Query(key string) string

Query returns the keyed url query value if it exists

func (*Server) Render

func (srv *Server) Render(bytes []byte)

Render render from bytes

func (*Server) SkipValidate

func (srv *Server) SkipValidate(skip bool)

SkipValidate set skip validate

func (*Server) String

func (srv *Server) String(str string)

String render from string

func (*Server) Validate

func (srv *Server) Validate() bool

Validate 校验请求是否合法

func (*Server) XML

func (srv *Server) XML(obj interface{})

XML render to xml

Jump to

Keyboard shortcuts

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