validators

package
v0.0.0-...-9a2df54 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelperValidateStructGoKit

func HelperValidateStructGoKit(payloadPtr any) error

avoids repetition

func HelperValidateStructGoPlayground

func HelperValidateStructGoPlayground(payloadPtr any) error

avoids repetition

Types

type GoPlayground

type GoPlayground struct {
	Trans ut.Translator
	// contains filtered or unexported fields
}

func NewGoPlaygroundValidator

func NewGoPlaygroundValidator() *GoPlayground

func (*GoPlayground) Translator

func (o *GoPlayground) Translator(err error) string

func (*GoPlayground) ValidateStruct

func (o *GoPlayground) ValidateStruct(vPtr any) error

type GooKit

type GooKit struct{}

func NewGooKitValidator

func NewGooKitValidator() *GooKit

func (*GooKit) Translator

func (o *GooKit) Translator(err error) string

func (*GooKit) ValidateStruct

func (o *GooKit) ValidateStruct(vPtr any) error

type IValidators

type IValidators interface {
	// ValidateStruct used to validate a struct pointer
	ValidateStruct(vPtr any) error
	// Used to transate the errors from VaalidateStruct to error
	Translator(err error) string
}

Jump to

Keyboard shortcuts

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