Documentation ¶
Index ¶
- func ErrInternalOrNotFound(err error) error
- func GetFS() (f http.FileSystem, err error)
- func GetQueryBool(ctx *fiber.Ctx, key string, def bool) (bool, error)
- func GetQueryInt(ctx *fiber.Ctx, key string, def, min, max int) (int, error)
- func ParseBase64Data(b64Data string) (mime string, data []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrInternalOrNotFound ¶
ErrInternalOrNotFound returns a fiber not found error when the passed error is a ErrDatabaseNotFound error. Otherwise, the passed error is returned unchanged.
func GetFS ¶
func GetFS() (f http.FileSystem, err error)
func GetQueryBool ¶
GetQueryBool tries to get a value from request query and transforms it to an bool value.
If the query value is not provided, def is returened.
Valid string values for <true> are 'true', '1' or 'yes. Valid values for <false> are 'false', '0' or 'no'.
Returned errors are in form of fiber errors with appropriate error codes.
func GetQueryInt ¶
GetQueryInt tries to get a value from request query and transforms it to an integer value.
If the query value is not provided, def is returened.
If the integer value is smaller than min or larger than max (if max is larger than 0), a bounds error is returned.
Returned errors are in form of fiber errors with appropriate error codes.
Types ¶
This section is empty.