mux

package module
v0.0.0-...-94fa543 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 3 Imported by: 0

README

mux

#GOLANG

http server router

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RW

type RW struct {
	http.ResponseWriter
	Params   []string
	Wildcard string
}

type Route

type Route struct {
	NotAllowCb, NotFoundCb, BadRqstCb http.HandlerFunc
	// contains filtered or unexported fields
}

func Config

func Config(notAllowCb, notFoundCb, badRqstCb http.HandlerFunc) (r *Route)

func (Route) ServeHTTP

func (r Route) ServeHTTP(rw http.ResponseWriter, rq *http.Request)

func (*Route) Set

func (r *Route) Set(method, path string, callback http.HandlerFunc) error

type Trie

type Trie []struct {
	Chr  byte
	Prfx string
	CB   http.HandlerFunc
	Nxt  Trie
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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