Documentation ¶
Index ¶
- func ParseId(w http.ResponseWriter, input string) int64
- func ReadJSONRequest(w http.ResponseWriter, r *http.Request, dest any)
- func WriteJSONResponse(w http.ResponseWriter, err error, statusCode int, data any)
- func WriteValidationErrors(w http.ResponseWriter, payload validator.ValidationErrors)
- type Application
- type JSONError
- type JSONResponse
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadJSONRequest ¶
func ReadJSONRequest(w http.ResponseWriter, r *http.Request, dest any)
func WriteJSONResponse ¶
func WriteJSONResponse(w http.ResponseWriter, err error, statusCode int, data any)
func WriteValidationErrors ¶
func WriteValidationErrors(w http.ResponseWriter, payload validator.ValidationErrors)
Types ¶
type Application ¶
type Application struct { Config *config.Configuration Service *Service }
func (*Application) SetupRouter ¶
func (app *Application) SetupRouter() http.Handler
type JSONResponse ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.