validator

package
v0.0.0-...-c5e0fe0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Fields []FieldError `json:"errors"`
}

func (*Error) ToMap

func (e *Error) ToMap() []map[string]interface{}

type FieldError

type FieldError struct {
	Field string `json:"f"`
	Cause string `json:"c"`
	Value any    `json:"v"`
}

func (*FieldError) ToMap

func (fe *FieldError) ToMap() map[string]interface{}

type Validator

type Validator interface {
	Validate(i any) *Error
}

func Instance

func Instance() Validator

Jump to

Keyboard shortcuts

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