router
packageThis package is not in the latest version of its module.
Details
Valid go.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- type ExperimentalRoute
- type Route
- func Experimental(r Route) Route
- func NewDeleteRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route
- func NewGetRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route
- func NewHeadRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route
- func NewOptionsRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route
- func NewPostRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route
- func NewPutRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route
- func NewRoute(method, path string, handler httputils.APIFunc, opts ...RouteWrapper) Route
- type RouteWrapper
- type Router
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeExperimentalRoute¶added inv1.13.0
type ExperimentalRoute interface {RouteEnable()Disable()}ExperimentalRoute defines an experimental API route that can be enabled or disabled.
typeRoute¶
type Route interface {// Handler returns the raw function to create the http handler.Handler()httputils.APIFunc// Method returns the http method that the route responds to.Method()string// Path returns the subpath where the route responds to.Path()string}Route defines an individual API route in the docker server.
funcExperimental¶added inv1.13.0
Experimental will mark a route as experimental.
funcNewDeleteRoute¶added inv1.11.0
func NewDeleteRoute(pathstring, handlerhttputils.APIFunc, opts ...RouteWrapper)Route
NewDeleteRoute initializes a new route with the http method DELETE.
funcNewGetRoute¶added inv1.11.0
func NewGetRoute(pathstring, handlerhttputils.APIFunc, opts ...RouteWrapper)Route
NewGetRoute initializes a new route with the http method GET.
funcNewHeadRoute¶added inv1.11.0
func NewHeadRoute(pathstring, handlerhttputils.APIFunc, opts ...RouteWrapper)Route
NewHeadRoute initializes a new route with the http method HEAD.
funcNewOptionsRoute¶added inv1.11.0
func NewOptionsRoute(pathstring, handlerhttputils.APIFunc, opts ...RouteWrapper)Route
NewOptionsRoute initializes a new route with the http method OPTIONS.
funcNewPostRoute¶added inv1.11.0
func NewPostRoute(pathstring, handlerhttputils.APIFunc, opts ...RouteWrapper)Route
NewPostRoute initializes a new route with the http method POST.
funcNewPutRoute¶added inv1.11.0
func NewPutRoute(pathstring, handlerhttputils.APIFunc, opts ...RouteWrapper)Route
NewPutRoute initializes a new route with the http method PUT.
typeRouteWrapper¶
RouteWrapper wraps a route with extra functionality.It is passed in when creating a new route.