error

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Fields is the fields flag
	Fields = "$fields"

	// Errors is the errors flag
	Errors = "$errors"
)

Functions

This section is empty.

Types

type Parser

type Parser struct{}

Parser is the struct for the error parser

func NewParser

func NewParser() *Parser

NewParser creates a new Parser struct

func (*Parser) GenerateValidationsMessage

func (p *Parser) GenerateValidationsMessage(
	validations govalidatormappervalidations.Validations,
	level int,
) (*string, error)

GenerateValidationsMessage returns a formatted error message for Parser

func (*Parser) GetLevelPadding

func (p *Parser) GetLevelPadding(level int) string

GetLevelPadding returns the padding for the level

func (*Parser) ParseValidations

func (p *Parser) ParseValidations(validations govalidatormappervalidations.Validations) (
	interface{},
	error,
)

ParseValidations parses the validations and returns the validations message

Jump to

Keyboard shortcuts

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