httpmux

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NonEmptyRestParam

func NonEmptyRestParam(name string) string

func Param

func Param(name string) string

func Path

func Path(parts ...string) string

func PathRegexpParam

func PathRegexpParam(name string, re string) string

func RestParam

func RestParam(name string) string

Types

type Handler

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

func (Handler) Pattern

func (h Handler) Pattern() string

type Mux

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

func New

func New() *Mux

func (*Mux) GetHandler

func (mux *Mux) GetHandler(r *http.Request) *Handler

func (*Mux) Handle

func (me *Mux) Handle(path string, h http.Handler)

func (*Mux) HandleFunc

func (me *Mux) HandleFunc(path string, hf func(http.ResponseWriter, *http.Request))

func (*Mux) ServeHTTP

func (me *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PathParams

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

func RequestPathParams

func RequestPathParams(r *http.Request) *PathParams

func (*PathParams) ByName

func (me *PathParams) ByName(name string) string

Jump to

Keyboard shortcuts

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