http

package
v0.0.0-...-19fd678 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlerConstructor

func RegisterHandlerConstructor(svc apps.AppService, constructor handlerConstructor)

RegisterHandlerConstructor 注册处理程序的函数

func Registry2Gin

func Registry2Gin(r gin.IRouter)

Types

type Handler

type Handler interface {
	Handle()
	Name() string
	GenerateRoute() string
	Registry(r gin.IRouter)
}

通过写一个实体类,来处理http协议,内部接口暴露 需要依赖内部接口的实现

func NewHostHandler

func NewHostHandler() Handler

func NewServerHandler

func NewServerHandler() Handler

type HandlerFactory

type HandlerFactory struct{}

func NewHandlerFactory

func NewHandlerFactory() *HandlerFactory

type HandlerService

type HandlerService interface {
	RegistryHandlers(handler Handler) error
	//CreateHandler(service apps.AppService) (Handler, error)
	//getSupportedServices() []apps.AppService
	Start() error
	Stop() error
}

HandlerService 是一个管理处理程序(handler)的服务接口

func NewHandlerService

func NewHandlerService() HandlerService

type HostHandler

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

func (*HostHandler) GenerateRoute

func (h *HostHandler) GenerateRoute() string

func (*HostHandler) Handle

func (h *HostHandler) Handle()

func (*HostHandler) Name

func (h *HostHandler) Name() string

func (*HostHandler) Registry

func (h *HostHandler) Registry(r gin.IRouter)

type HttpService

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

func NewHttpService

func NewHttpService() *HttpService

func (*HttpService) Start

func (s *HttpService) Start() error

func (*HttpService) Stop

func (s *HttpService) Stop() error

type ServerHandler

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

func (*ServerHandler) GenerateRoute

func (s *ServerHandler) GenerateRoute() string

func (*ServerHandler) Handle

func (h *ServerHandler) Handle()

func (*ServerHandler) Name

func (s *ServerHandler) Name() string

func (*ServerHandler) Registry

func (s *ServerHandler) Registry(r gin.IRouter)

Jump to

Keyboard shortcuts

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