Documentation
¶
Index ¶
- func AuthRequired() fiber.Handler
- func Cors() func(*fiber.Ctx) error
- func ErrorHandler(log logger.Interface) fiber.Handler
- func ExtractTokenFromHeader(ctx *fiber.Ctx) (string, error)
- func IdentityFromContext(ctx *fiber.Ctx) any
- func IdentityInContext(ctx *fiber.Ctx, identity any)
- func MwValidateBody[bodyType any](c *fiber.Ctx) error
- func ParseAndValidate(ctx *fiber.Ctx, payloadPtr any) error
- func ParseBody(c *fiber.Ctx, payloadPtr any) error
- func RequestID() fiber.Handler
- func TimeTakenToProcessEndpoint() fiber.Handler
- func ValidateBody(payloadPtr any) error
- func ValidateToken(token string) (bool, error)
- func ValidatedDataFromContext(ctx *fiber.Ctx) (val any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthRequired ¶
func AuthRequired() fiber.Handler
func ErrorHandler ¶
func ExtractTokenFromHeader ¶
ExtractTokenFromHeader from a header
func IdentityFromContext ¶
func IdentityFromContext(ctx *fiber.Ctx) any
IdentityFromContext gets the user identity from a context
func IdentityInContext ¶
func IdentityInContext(ctx *fiber.Ctx, identity any)
IdentityInContext: Places the user identity in a context
func MwValidateBody ¶
MwValidateBody performs same function as ParseAndValidate but this is a middleware
func ParseAndValidate ¶
ParseAndValidate performs the work of both PARSEBODY and VALIDATEBODY
func ParseBody ¶
ParseBody reads either a json or xml or html forms or urls body and then parse to a struct. After which if there is an error it detects error type
func TimeTakenToProcessEndpoint ¶
func TimeTakenToProcessEndpoint() fiber.Handler
func ValidateBody ¶
ValidateBody validates a struct and returns error if any found
func ValidatedDataFromContext ¶
func ValidatedDataFromContext(ctx *fiber.Ctx) (val any)
ValidatedDataFromContext(c).(*type)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.