package
1.0.0
Repository: https://github.com/mbiagini/go-server-utils.git
Documentation: pkg.go.dev

# Functions

DecodeJSONRequestBody wraps json.Decoder.Decode() function, adding validation and error checking.
DecodeJSONResponseBody wraps ioutil.ReadAll and json.Unmarshal functions to extract an http.Response's body and unmarshal it into either an ok response or an error response from an external API.
FlatErrors receives a slice of validator.FieldError (alias: ValidationErrors) and returns an error built with all retrieved messages joined by a semicolon.
If an error is found, an HttpSuggestionError is returned, suggesting that the caller returns this error to the client.
Returns error found, if any, containing all messages joined by a semicolon.
Returns error found, if any, containing all messages joined by a semicolon.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ValidationError is the struct returned by some functions of this package to indicate that one or more errors were found in a validation process.

# Type aliases

ResponseType is used to inform in a function output params of this package what type of response is being returned to the caller.