server

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 13 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
	// contains filtered or unexported fields
}

Server struct

func NewServer

func NewServer(context *context.Context) *Server

NewServer init

func (*Server) GetOpenID

func (srv *Server) GetOpenID() string

GetOpenID return openID

func (*Server) MessageForward

func (srv *Server) MessageForward()

func (*Server) MessageForwardSend

func (srv *Server) MessageForwardSend(postUrl string, retryNum *int)

func (*Server) Send

func (srv *Server) Send() (err error)

Send 将自定义的消息发送

func (*Server) Serve

func (srv *Server) Serve() error

Serve 处理微信的请求消息

func (*Server) SetMessageForward

func (srv *Server) SetMessageForward(url string, token string)

func (*Server) SetMessageHandler

func (srv *Server) SetMessageHandler(handler func(message.MixMessage) *message.Reply)

SetMessageHandler 设置用户自定义的回调方法

func (*Server) Validate

func (srv *Server) Validate() bool

Validate 校验请求是否合法

Jump to

Keyboard shortcuts

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