stdadapter

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 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 Router

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

Router adapts http.ServeMux to api.Router.

func New

func New(mux *http.ServeMux, docs *doc.Docs) *Router

New creates a net/http adapter.

func (*Router) Handle

func (router *Router) Handle(method string, path string, handler http.HandlerFunc, opts ...doc.RouteOption)

Handle registers an HTTP handler and stores its metadata.

func (*Router) ServeHTTP

func (router *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP delegates to the wrapped ServeMux.

Jump to

Keyboard shortcuts

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