server

package
v1.0.0-beta.216 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RouterConfig router.Config
	RouterHooks  RouterHooks
}

type MiddlewareHook

type MiddlewareHook func(m MiddlewareManager)

type MiddlewareManager

type MiddlewareManager interface {
	Use(middlewares ...func(http.Handler) http.Handler)
}

type RouteHook

type RouteHook func(r RouteManager)

type RouteManager

type RouteManager interface {
	Mount(pattern string, h http.Handler)
	Handle(pattern string, h http.Handler)
	HandleFunc(pattern string, h http.HandlerFunc)
	Method(method, pattern string, h http.Handler)
	MethodFunc(method, pattern string, h http.HandlerFunc)
	Connect(pattern string, h http.HandlerFunc)
	Delete(pattern string, h http.HandlerFunc)
	Get(pattern string, h http.HandlerFunc)
	Head(pattern string, h http.HandlerFunc)
	Options(pattern string, h http.HandlerFunc)
	Patch(pattern string, h http.HandlerFunc)
	Post(pattern string, h http.HandlerFunc)
	Put(pattern string, h http.HandlerFunc)
	Trace(pattern string, h http.HandlerFunc)
}

type RouterHooks

type RouterHooks struct {
	Middlewares []MiddlewareHook
	Routes      []RouteHook
}

type Server

type Server struct {
	chi.Router
}

func NewServer

func NewServer(config *Config) (*Server, error)

type ServerLogger

type ServerLogger struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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