validator

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonValidation

func JsonValidation(name string, err error) error

func Length

func Length(s string, min, max int) error

func LengthBytes

func LengthBytes(s []byte, min, max int) error

Types

type Error

type Error struct {
	ParameterName string `json:"parameter"`
	Message       string `json:"message"`
}

func NewError

func NewError(parameterName, message string) Error

func (Error) Error

func (e Error) Error() string

type ErrorList

type ErrorList []Error

func (ErrorList) GetError

func (l ErrorList) GetError() error

func (ErrorList) String

func (l ErrorList) String() string

func (ErrorList) With

func (l ErrorList) With(errors ...error) ErrorList

func (ErrorList) WithPrefix

func (l ErrorList) WithPrefix(prefix string, errorList ...error) (result ErrorList)

type ErrorListError

type ErrorListError struct {
	ErrorList
}

func (ErrorListError) Error

func (l ErrorListError) Error() string

func (ErrorListError) MarshalJSON

func (l ErrorListError) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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