Documentation ¶
Overview ¶
Golang SwaggerUI
Schemes: https, http BasePath: /api Version: 1.0.0 Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Router *httprouter.Router Log *logrus.Logger }
API def
func (*API) ListenAndServe ¶
ListenAndServe always returns a non-nil error.
func (*API) WriteJSONResponse ¶
func (*API) WriteJSONResponse(w http.ResponseWriter, status int, response interface{})
WriteJSONResponse to response writer
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
The type of our middleware consists of the original handler we want to wrap and a message
func NewMiddleware ¶
Make a constructor for our middleware type since its fields are not exported (in lowercase)
func (*Middleware) ServeHTTP ¶
func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
Our middleware handler
Click to show internal directories.
Click to hide internal directories.