Documentation ¶
Index ¶
- type RouteBuilder
- func (rb *RouteBuilder) AddBaseHandler(pattern string, handler http.Handler, ...) *RouteBuilder
- func (rb *RouteBuilder) AddBaseHandlerFunc(method string, pattern string, handler http.HandlerFunc) *RouteBuilder
- func (rb *RouteBuilder) AddBaseRoutes(controller controllers.Controller) *RouteBuilder
- func (rb *RouteBuilder) AddV1HandlerFunc(method, pattern string, handler http.HandlerFunc) *RouteBuilder
- func (rb *RouteBuilder) AddV1Routes(controller controllers.Controller) *RouteBuilder
- func (rb *RouteBuilder) Build() chi.Router
- func (rb *RouteBuilder) UseV1Middlewares(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) AddBaseHandler ¶
func (rb *RouteBuilder) AddBaseHandler(pattern string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) *RouteBuilder
AddBaseHandler adds the handler to the base path
func (*RouteBuilder) AddBaseHandlerFunc ¶
func (rb *RouteBuilder) AddBaseHandlerFunc(method string, pattern string, handler http.HandlerFunc) *RouteBuilder
AddBaseHandlerFunc adds a handler function to the base router for a specific pattern
func (*RouteBuilder) AddBaseRoutes ¶
func (rb *RouteBuilder) AddBaseRoutes(controller controllers.Controller) *RouteBuilder
AddBaseRoutes adds the controllers routes to the base path
func (*RouteBuilder) AddV1HandlerFunc ¶ added in v0.6.0
func (rb *RouteBuilder) AddV1HandlerFunc(method, pattern string, handler http.HandlerFunc) *RouteBuilder
AddV1HandlerFunc adds a handler function to the v1 router for a specific pattern
func (*RouteBuilder) AddV1Routes ¶
func (rb *RouteBuilder) AddV1Routes(controller controllers.Controller) *RouteBuilder
AddV1Routes adds the controllers routes to the /v1 path
func (*RouteBuilder) Build ¶
func (rb *RouteBuilder) Build() chi.Router
Build returns and instance of a chi.Router with all routes added
func (*RouteBuilder) UseV1Middlewares ¶ added in v0.6.0
func (rb *RouteBuilder) UseV1Middlewares(middlewares ...func(http.Handler) http.Handler) *RouteBuilder
UseV1Middlewares adds middlewares to the v1 router
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.