Versions in this module Expand all Collapse all v0 v0.1.0 Feb 11, 2020 Changes in this version + const ContentEncodingGZIP + const HeaderAcceptEncoding + const HeaderAccessControlAllowCredentials + const HeaderAccessControlAllowHeaders + const HeaderAccessControlAllowMethods + const HeaderAccessControlAllowOrigin + const HeaderAccessControlExposeHeaders + const HeaderAccessControlMaxAge + const HeaderAccessControlRequestHeaders + const HeaderAccessControlRequestMethod + const HeaderContentEncoding + const HeaderContentType + const HeaderEtag + const HeaderIfNoneMatch + const HeaderLongPoll + const HeaderOrigin + const HeaderVary + func ByKind(ks ...Kind) func(*Route) bool + func ByPath(pcs ...string) func(*Route) bool + func DumpRequest(next http.Handler) http.Handler + func GZIP(h http.Handler) http.Handler + func LogRequests(h http.Handler) http.Handler + func LongPolling() (middleware Decorator, signal SignalFunc) + func NoCache(h http.Handler) http.Handler + func SetAllCORSHeaders(w http.ResponseWriter, r *http.Request, ac AccessControl) + func Tree(n *Route) string + type AccessControl struct + AllowCredentials bool + AllowHeaders []string + AllowMethods []string + AllowOrigin string + ExposeHeaders []string + MaxAge uint64 + var AccessControlDefaults AccessControl + var AccessControlPreflight AccessControl + type Chain struct + func NewChain(decorators ...Decorator) Chain + func (c Chain) Append(decorators ...Decorator) Chain + func (c Chain) Then(h http.Handler) http.Handler + func (c Chain) ThenFunc(f http.HandlerFunc) http.Handler + type Decorator func(http.Handler) http.Handler + func CORS(ac AccessControl) Decorator + type Kind uint8 + const KindCatchAll + const KindParameter + const KindStatic + func ClassifyKind(path string) Kind + func (k Kind) String() string + type Manager struct + func NewManager(options ...func(*Manager) error) (*Manager, error) + func (m *Manager) Await(key string) Signal + func (m *Manager) SetOption(options ...func(*Manager) error) error + func (m *Manager) Signal(prefix string) + type Route struct + func NewRoute(path string) *Route + func (r *Route) Append(child *Route) error + func (r *Route) Children() Routes + func (r *Route) DELETE(h http.Handler) + func (r *Route) FirstChild() *Route + func (r *Route) FullPath() string + func (r *Route) GET(h http.Handler) + func (r *Route) HEAD(h http.Handler) + func (r *Route) Handler(m string) (http.Handler, bool) + func (r *Route) IsFirstChild() bool + func (r *Route) IsLastChild() bool + func (r *Route) IsLeaf() bool + func (r *Route) IsRoot() bool + func (r *Route) Kind() Kind + func (r *Route) LastChild() *Route + func (r *Route) Level() int + func (r *Route) Match(path string) (*Route, map[string]string) + func (r *Route) Methods() []string + func (r *Route) OPTIONS(h http.Handler) + func (r *Route) PATCH(h http.Handler) + func (r *Route) POST(h http.Handler) + func (r *Route) PUT(h http.Handler) + func (r *Route) Parent() *Route + func (r *Route) Path() string + func (r *Route) Route(path string) *Route + func (r *Route) Set(nr *Route) error + func (r *Route) SetHandler(m string, h http.Handler) + func (r *Route) Siblings() Routes + func (r *Route) String() string + type Router struct + func New() *Router + func (r *Router) Route(path string) *Route + func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (r *Router) String() string + type Routes []*Route + func (rs Routes) Filter(f func(r *Route) bool) Routes + func (rs Routes) FindOne(f func(r *Route) bool) *Route + func (rs Routes) Len() int + func (rs Routes) Less(i, j int) bool + func (rs Routes) Swap(i, j int) + type Signal chan struct + type SignalFunc func(key string) + type Timing struct + func NewTiming() *Timing + func (ts *Timing) Mark(key string) + func (ts *Timing) WriteTo(header http.Header)