Documentation
¶
Overview ¶
Package api provides controllers for each api endpoint. Controllers are "dumb wiring"; there is little to no application logic in this package. Controllers call and coordinate other packages to satisfy the api endpoint.
Index ¶
Constants ¶
View Source
const (
API_ROOT = "/api/v1/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides controllers for endpoints it registers with a router. It satisfies the http.HandlerFunc interface.
func NewAPI ¶
NewAPI cretes a new API struct. It initializes an echo web server within the struct, and registers all of the API's routes with it.
func (*API) ServeHTTP ¶
func (api *API) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP allows the API to statisfy the http.HandlerFunc interface.
func (*API) Use ¶
func (api *API) Use(middleware ...echo.MiddlewareFunc)
Use adds middleware to the echo web server in the API. See https://echo.labstack.com/middleware for more details.
Click to show internal directories.
Click to hide internal directories.