utils

package
v0.0.0-...-385be9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNewAccessToken

func GenerateNewAccessToken() (string, error)

func NewValidator

func NewValidator() *validator.Validate

NewValidator func for creating a new validator for model fields.

func StartServer

func StartServer(a *fiber.App)

func StartServerWithGracefulShutdown

func StartServerWithGracefulShutdown(a *fiber.App)

func ValidateUUID

func ValidateUUID(field reflect.Value) interface{}

func ValidatorErrors

func ValidatorErrors(err error) map[string]string

ValidatorErrors func for showing validation error for each invalid field.

Types

type TokenMetadata

type TokenMetadata struct {
	Expires int64
}

TokenMetadata struct to describe metadata in JWT.

func ExtractTokenMetadata

func ExtractTokenMetadata(c *fiber.Ctx) (*TokenMetadata, error)

ExtractTokenMetadata func to extract metadata from JWT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL