validator

package
v0.0.0-...-c02a6a4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorMap

func NewErrorMap(errs map[string]error) error

Types

type ErrorMap

type ErrorMap struct {
	Errors map[string]error
}

func (ErrorMap) Error

func (e ErrorMap) Error() string

type ErrorResponse

type ErrorResponse struct {
	Field string `json:"field"`
	Tag   string `json:"tag"`
	Value string `json:"value,omitempty"`
}

type GoValidator

type GoValidator struct {
	// contains filtered or unexported fields
}

func (*GoValidator) Validate

func (v *GoValidator) Validate(ctx context.Context, data interface{}) error

type Validator

type Validator interface {
	Validate(ctx context.Context, data interface{}) error
}

func NewGoValidator

func NewGoValidator() Validator

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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