jsrouter

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package jsrouter implements the router.Provider interface and wraps the julienschmidt.httprouter.

All router params are getting set to the request context with the key router.PARAMS. See Options for more details. The matched url pattern is set to the request context with the key router.PATTERN. If a route action was defined, it gets set as router.ACTION. If the request method is OPTION, all allowed HTTP methods are set as router.ALLOW. TODO create Option struct for configure the js-http router. TODO ALLOW (CORS) context params have to get set and tested.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyValuePair = errors.New("jsrouter: Catch-all key/value pair mismatch")
)

Error messages

Functions

func New

func New(manager router.Manager, options interface{}) (router.Provider, error)

New configured instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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