muxhandler

package
v1.2.39 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExampleHTTPServerRun

func ExampleHTTPServerRun()

func GetHostInfo

func GetHostInfo(resp http.ResponseWriter, req *http.Request)

func JSON

func JSON(resp http.ResponseWriter, v any)

func New

func New(hm HandlerMap) *http.ServeMux

func Pong

func Pong(resp http.ResponseWriter, req *http.Request)

func Status

func Status(resp http.ResponseWriter, code int)

Status must http.StatusCode

func String

func String(resp http.ResponseWriter, v string)

Types

type HandlerMap

type HandlerMap map[string]HandlerV

type HandlerV

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

func ANY

func ANY(handlerFunc http.HandlerFunc) HandlerV

func CONNECT

func CONNECT(handlerFunc http.HandlerFunc) HandlerV

func DELETE

func DELETE(handlerFunc http.HandlerFunc) HandlerV

func GET

func GET(handlerFunc http.HandlerFunc) HandlerV
func HEAD(handlerFunc http.HandlerFunc) HandlerV

func Handle

func Handle(handlerFunc http.HandlerFunc, httpMethod ...string) HandlerV

func OPTIONS

func OPTIONS(handlerFunc http.HandlerFunc) HandlerV

func PATCH

func PATCH(handlerFunc http.HandlerFunc) HandlerV

func POST

func POST(handlerFunc http.HandlerFunc) HandlerV

func PUT

func PUT(handlerFunc http.HandlerFunc) HandlerV

func TRACE

func TRACE(handlerFunc http.HandlerFunc) HandlerV

Jump to

Keyboard shortcuts

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