std

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpContextType = reflect.TypeOf((*httpctx.Context)(nil))
)

Functions

func Chain

func Chain(f http.HandlerFunc, middlewares ...Middleware) http.HandlerFunc

Chain applies middlewares to a http.HandlerFunc

func Register

func Register(engine *http.ServeMux, svcs ...pick.Service[Middleware])

func RegisterGrpcService

func RegisterGrpcService(engine *http.ServeMux, svcs ...pick.Service[Middleware])

Types

type Middleware

type Middleware func(http.HandlerFunc) http.HandlerFunc

type Writer

type Writer struct {
	http.ResponseWriter
}

func (Writer) Header

func (w Writer) Header() httpi.Header

func (Writer) Status

func (w Writer) Status(code int)

func (Writer) Write

func (w Writer) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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