mux

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 38 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MuxHttpContextContextKey muxHttpContextContextType

Functions

This section is empty.

Types

type Mux

type Mux struct {
	EndpointMap map[string]map[string]*endpointPkg.Endpoint
	// contains filtered or unexported fields
}

func New

func New(endpoints ...*endpointPkg.Endpoint) *Mux

func (*Mux) Add

func (mux *Mux) Add(endpoints ...*endpointPkg.Endpoint)

func (*Mux) Delete

func (mux *Mux) Delete(endpoints ...*endpointPkg.Endpoint)

func (*Mux) DuplicateEndpointSpecification

func (mux *Mux) DuplicateEndpointSpecification(endpoint *endpointPkg.Endpoint, routes ...string) error

func (*Mux) Get

func (mux *Mux) Get(path string, method string) *endpointPkg.Endpoint

func (*Mux) GetContentSecurityPolicy

func (mux *Mux) GetContentSecurityPolicy() (*content_security_policy.ContentSecurityPolicy, error)

func (*Mux) GetDocumentEndpointSpecifications

func (mux *Mux) GetDocumentEndpointSpecifications() []*endpointPkg.Endpoint

func (*Mux) ServeHTTP

func (mux *Mux) ServeHTTP(originalResponseWriter http.ResponseWriter, request *http.Request)

func (*Mux) ServeHttpWithCallback

func (bm *Mux) ServeHttpWithCallback(
	originalResponseWriter http.ResponseWriter,
	request *http.Request,
	callback func(*http.Request, *muxTypesResponseWriter.ResponseWriter) (*muxTypesResponse.Response, *muxTypesResponseError.ResponseError),
)

func (*Mux) SetContentSecurityPolicy

func (mux *Mux) SetContentSecurityPolicy(csp *content_security_policy.ContentSecurityPolicy) error

type VhostMux

type VhostMux struct {
	HostToSpecification map[string]*VhostMuxSpecification
	// contains filtered or unexported fields
}

func (*VhostMux) PatchHttpServer

func (vhostMux *VhostMux) PatchHttpServer(httpServer *http.Server)

func (*VhostMux) ServeHTTP

func (vhostMux *VhostMux) ServeHTTP(responseWriter http.ResponseWriter, request *http.Request)

func (*VhostMux) ServeHttpWithCallback

func (bm *VhostMux) ServeHttpWithCallback(
	originalResponseWriter http.ResponseWriter,
	request *http.Request,
	callback func(*http.Request, *muxTypesResponseWriter.ResponseWriter) (*muxTypesResponse.Response, *muxTypesResponseError.ResponseError),
)

type VhostMuxSpecification

type VhostMuxSpecification struct {
	Mux         http.Handler
	RedirectTo  string
	Certificate *tls.Certificate
}

Directories

Path Synopsis
mux
types
body_parser module
json/schema module
jwt module

Jump to

Keyboard shortcuts

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