utils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionURLBuilder

func ConnectionURLBuilder(n string) (string, error)

ConnectionURLBuilder func for building URL connection.

func ErrorHandler

func ErrorHandler(c *fiber.Ctx, err error) error

ErrorHandler is a custom error handler for Fiber.

func NewValidator

func NewValidator() *validator.Validate

NewValidator func for create a new validator for model fields.

validate := utils.NewValidator()
if err := validate.Struct(object); err != nil { }

func PascalCaseToCamelcase added in v0.0.5

func PascalCaseToCamelcase(s string) string

PascalCaseToCamelcase converts a PascalCase string to camelCase.

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 StringToUint added in v0.0.5

func StringToUint(s string) (uint, error)

StringToUint function to convert string to uint.

func ValidatorErrors

func ValidatorErrors(err error) map[string]string

ValidatorErrors func for show validation errors for each invalid fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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