Documentation ¶
Overview ¶
Package api contains the client-facing layers, such as, the RESTful endpoints where clients can interact with the API.
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 ¶
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 ¶
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 ¶
func (rb *RouteBuilder) AddRoutes(controller controllers.Controller) *RouteBuilder
AddRoutes adds the controllers routes to the path
func (*RouteBuilder) Router ¶
func (rb *RouteBuilder) Router() chi.Router
Router returns and instance of a chi.Router with all routes added
func (*RouteBuilder) SubRouteBuilder ¶
func (rb *RouteBuilder) SubRouteBuilder(subPath string) *RouteBuilder
SubRouteBuilder returns a RouteBuilder under the given subpath
func (*RouteBuilder) WithSubRouter ¶
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 |
---|---|
Package controllers adds support for RESTful endpoints.
|
Package controllers adds support for RESTful endpoints. |
Package graphql package
|
Package graphql package |
loader
Package loader package
|
Package loader package |
resolver
Package resolver contains functionality for interacting with the API via GraphQL.
|
Package resolver contains functionality for interacting with the API via GraphQL. |
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 grpc implements gRPC functionality.
|
Package grpc implements gRPC functionality. |
reader
Package reader implements a size-limited reader for uploading templates of multiple kinds.
|
Package reader implements a size-limited reader for uploading templates of multiple kinds. |
servers
Package servers implements the gRPC servers.
|
Package servers implements the gRPC servers. |
Package middleware allows adding custom middleware(s) to the RESTful API, such as, JWT based authentication.
|
Package middleware allows adding custom middleware(s) to the RESTful API, such as, JWT based authentication. |
Package response providers support for returning http responses
|
Package response providers support for returning http responses |
Package urn provides the PRN (Phobos Resource Name) functionalities.
|
Package urn provides the PRN (Phobos Resource Name) functionalities. |
Click to show internal directories.
Click to hide internal directories.