server

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuccessEmptyResponse = "success"
	EchoStr              = "echostr"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server 公众账号服务端

func New

func New(account contracts.AccountInterface) *Server

func (*Server) Dispatch

func (sg *Server) Dispatch(
	request *http.Request,
	writer http.ResponseWriter,
	handler contracts.EventHandlerInterface,
)

Dispatch 直接调度事件处理

func (*Server) Register

func (sg *Server) Register(handler contracts.EventHandlerInterface, guard event.Guard)

Register 注册消息处理器

func (*Server) Serve

func (sg *Server) Serve(request *http.Request, writer http.ResponseWriter)

Serve Handle and return response.

Jump to

Keyboard shortcuts

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