utils

package
v0.0.0-...-557f8b3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNewAccessToken

func GenerateNewAccessToken() (string, error)

GenerateNewAccessToken func for generate a new Access token.

func NewValidator

func NewValidator() *validator.Validate

NewValidator func for create a new validator for model fields.

func StartServer

func StartServer(a *fiber.App)

StartServer func for starting a simple server.

func StartServerWithGracefulShutdown

func StartServerWithGracefulShutdown(a *fiber.App)

StartServerWithGracefulShutdown function for starting server with a graceful shutdown.

func ValidatorErrors

func ValidatorErrors(err error) map[string]string

ValidatorErrors func for show validation errors for each invalid fields.

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