Documentation ¶
Index ¶
- type Router
- func (r *Router) GetBaseRouter() *web.Router
- func (r *Router) Middleware(fn interface{})
- func (r *Router) Register(route string, method string, f interface{}) error
- func (r *Router) RegisterEndpoint(route string, method string, f interface{}) error
- func (r *Router) RegisterMiddleware() error
- func (r *Router) Subrouter(ctx interface{}, path string) *Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router instance
func (*Router) GetBaseRouter ¶
GetBaseRouter Fetch the underlying router. Note that operations on this will bypass any GoAPI magic
func (*Router) Middleware ¶
func (r *Router) Middleware(fn interface{})
Middleware Attach standard middleware to an API router
func (*Router) Register ¶
Register registers a basic http or gocraft/web route handler without any modification This does not currently call any meta plugins.
func (*Router) RegisterEndpoint ¶
RegisterEndpoint Register a route to the API router. This takes a typed endpoint and generates a wrapper to handle translation and validation of input and output structures, as well as error handling for the endpoint.
func (*Router) RegisterMiddleware ¶
RegisterMiddleware Attach dependency injected middleware to API router. This is not yet supported
Click to show internal directories.
Click to hide internal directories.