Versions in this module Expand all Collapse all v1 v1.3.0 Jun 27, 2021 Changes in this version + func HandleError(w http.ResponseWriter, err error) (code int) + func ProcessRequestFirstMatchOf(r *http.Request, keywordSets [][]string) (map[string]string, []string, error) + func ProcessRequestOneOf(r *http.Request, keywordSets [][]string) (map[string]string, []string, error) + func SendResponse(w http.ResponseWriter, result interface{}) error + func SendResponseWithMessage(w http.ResponseWriter, result interface{}, message string, code int) error + type HTTPHandler struct + Methods []string + func (h HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Handler interface + Handle func(w http.ResponseWriter, r *http.Request) error + type HandlerFunc func(http.ResponseWriter, *http.Request) error + func (f HandlerFunc) Handle(w http.ResponseWriter, r *http.Request) error + type Response struct + Errors []ResponseMessage + Messages []ResponseMessage + Result interface{} + Success bool + func NewErrorResponse(message string, code int) Response + func NewSuccessResponse(result interface{}) Response + func NewSuccessResponseWithMessage(result interface{}, message string, code int) Response + type ResponseMessage struct + Code int + Message string