Documentation ¶
Index ¶
- func AssignIfNonZero(field *int, newValue int)
- func AssignIfNonZeroFloat(field *float64, newValue float64)
- func AssignIfNotEmpty(field *string, newValue string)
- func AssignUUIDIFNonEmpty(id *uuid.UUID, newID uuid.UUID)
- func DecodeReqBody(r *http.Request, body interface{}) error
- func EnsureNumberValueIsPositive(number float64) error
- func EnsureValueIsAValidEmailFormat(email string) error
- func EnsureValueIsAValidUUID(uuid string) error
- func EnsureValueIsNotEmpty(field string) error
- func EnsureValueIsValidAge(age int) error
- func EnsureValueIsValidPasswordComplexity(password string) error
- func GetPagination(r *http.Request) (int, int)
- func GetURLParam(r *http.Request, key string) (string, error)
- func HandleHTTPError(w http.ResponseWriter, err error, code int)
- func HandleHTTPResponse(w http.ResponseWriter, msg string, code int, body interface{})
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignIfNonZero ¶
func AssignIfNonZeroFloat ¶
func AssignIfNotEmpty ¶
func DecodeReqBody ¶
func EnsureValueIsAValidUUID ¶
func EnsureValueIsNotEmpty ¶
func EnsureValueIsValidAge ¶
func HandleHTTPError ¶
func HandleHTTPError(w http.ResponseWriter, err error, code int)
func HandleHTTPResponse ¶
func HandleHTTPResponse(w http.ResponseWriter, msg string, code int, body interface{})
Types ¶
Click to show internal directories.
Click to hide internal directories.