Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StandardMux for HTTP. StandardMux = MuxKind("standard") // GatewayMux for HTTP. GatewayMux = MuxKind("gateway") )
Variables ¶
Functions ¶
func NewRuntimeServeMux ¶ added in v1.202.0
NewRuntimeServeMux for HTTP.
func NewStandardServeMux ¶ added in v1.202.0
NewServeMux for http.
Types ¶
type Errorer ¶ added in v1.218.0
type Errorer[Res any] interface { // Error for this handler. Error(ctx context.Context, err error) *Res // Status code from error. Status(err error) int }
Errorer for HTTP.
type Handler ¶ added in v1.218.0
Handler for HTTP.
func NewHandler ¶ added in v1.218.0
func NewHandler[Req any, Res any](mux ServeMux, mar *marshaller.Map, err Errorer[Res]) *Handler[Req, Res]
NewHandler for HTTP.
type RuntimeServeMux ¶ added in v1.202.0
RuntimeServeMux for HTTP.
func (*RuntimeServeMux) Handle ¶ added in v1.202.0
func (r *RuntimeServeMux) Handle(verb, pattern string, fn http.HandlerFunc) error
func (*RuntimeServeMux) Handler ¶ added in v1.202.0
func (r *RuntimeServeMux) Handler() http.Handler
type ServeMux ¶ added in v1.202.0
type ServeMux interface { // Handle a verb, pattern with the func. Handle(verb, pattern string, fn http.HandlerFunc) error // Handler from the mux. Handler() http.Handler }
ServeMux for HTTP.
type Server ¶ added in v1.164.0
type Server struct {
// contains filtered or unexported fields
}
Server for HTTP.
type StandardServeMux ¶ added in v1.202.0
StandardServeMux for HTTP.
func (*StandardServeMux) Handle ¶ added in v1.202.0
func (s *StandardServeMux) Handle(verb, pattern string, fn http.HandlerFunc) error
func (*StandardServeMux) Handler ¶ added in v1.202.0
func (s *StandardServeMux) Handler() http.Handler
Click to show internal directories.
Click to hide internal directories.