Documentation ¶
Index ¶
- type RouteBuilder
- func (rb *RouteBuilder) AddHandler(pattern string, handler http.Handler, ...) *RouteBuilder
- func (rb *RouteBuilder) AddHandlerFunc(method string, pattern string, handler http.HandlerFunc) *RouteBuilder
- func (rb *RouteBuilder) AddRoutes(controller controllers.Controller) *RouteBuilder
- func (rb *RouteBuilder) Router() chi.Router
- func (rb *RouteBuilder) SubRouteBuilder(subPath string) *RouteBuilder
- func (rb *RouteBuilder) WithSubRouter(subPath string, middlewares ...func(http.Handler) http.Handler) *RouteBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouteBuilder ¶
type RouteBuilder struct {
// contains filtered or unexported fields
}
RouteBuilder is used to build a Router instance
func NewRouteBuilder ¶
func NewRouteBuilder(middlewares ...func(http.Handler) http.Handler) *RouteBuilder
NewRouteBuilder creates an instance of RouterBuilder
func (*RouteBuilder) AddHandler ¶ added in v0.7.0
func (rb *RouteBuilder) AddHandler(pattern string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) *RouteBuilder
AddHandler adds the handler to the path
func (*RouteBuilder) AddHandlerFunc ¶ added in v0.7.0
func (rb *RouteBuilder) AddHandlerFunc(method string, pattern string, handler http.HandlerFunc) *RouteBuilder
AddHandlerFunc adds a handler function to the router for a specific pattern
func (*RouteBuilder) AddRoutes ¶ added in v0.7.0
func (rb *RouteBuilder) AddRoutes(controller controllers.Controller) *RouteBuilder
AddRoutes adds the controllers routes to the path
func (*RouteBuilder) Router ¶ added in v0.7.0
func (rb *RouteBuilder) Router() chi.Router
Router returns and instance of a chi.Router with all routes added
func (*RouteBuilder) SubRouteBuilder ¶ added in v0.7.0
func (rb *RouteBuilder) SubRouteBuilder(subPath string) *RouteBuilder
SubRouteBuilder returns a RouteBuilder under the given subpath
func (*RouteBuilder) WithSubRouter ¶ added in v0.7.0
func (rb *RouteBuilder) WithSubRouter(subPath string, middlewares ...func(http.Handler) http.Handler) *RouteBuilder
WithSubRouter mounts a router under the current RouteBuilder with the given subpath
Directories ¶
Path | Synopsis |
---|---|
schema
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API.
|
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API. |
Package response providers support for returning http responses
|
Package response providers support for returning http responses |
Click to show internal directories.
Click to hide internal directories.