httpmux

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: MIT Imports: 6 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 added in v1.1.0

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

func (Handler) Pattern added in v1.1.0

func (h Handler) Pattern() string

type Mux

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

func New

func New() *Mux

func (*Mux) GetHandler added in v1.1.0

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