validator

package
v0.0.0-...-03efb0c Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPathParams

func CheckPathParams(
	ctx *fiber.Ctx,
	pathParamsName string,
) (ok, string, response.ResponseFactory)

func CheckQueryParams

func CheckQueryParams(
	ctx *fiber.Ctx,
	queryParamStruct interface{},
) (ok, response.ResponseFactory)

func CheckReqBodySchema

func CheckReqBodySchema(
	ctx *fiber.Ctx,
	reqSchema interface{},
) (ok, response.ResponseFactory)

func CheckSchema

func CheckSchema[T comparable](
	ctx *fiber.Ctx,
	reqSchema T,
) (ok, response.ResponseFactory)

func CheckUserIDJWT

func CheckUserIDJWT(ctx *fiber.Ctx, logger *slog.Logger) (string, ok, response.ResponseFactory)

Types

type ValidatorError

type ValidatorError struct {
	Field   string
	Message string
}

func Validate

func Validate(i interface{}) []ValidatorError

Jump to

Keyboard shortcuts

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