http

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.10

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

type Context

type Context struct {
	Request  *request.Driver
	Response *response.Driver
}

func (*Context) Init

func (c *Context) Init(r *http.Request, w http.ResponseWriter)

Init 初始化

type Handler

type Handler interface {
	OnRequest(*Context)
}

type Server

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

func (*Server) AddHandler

func (server *Server) AddHandler(handlerName string, handler Handler)

func (*Server) SetConfig added in v0.0.10

func (server *Server) SetConfig(config map[string]any) error

Config 参数配置

func (*Server) SetIniConfig added in v0.0.10

func (server *Server) SetIniConfig(section *ini.Section) error

SetIniConfig ini 参数配置

func (*Server) Start

func (server *Server) Start()

Start 启动服务

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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