validation

package
v0.0.0-...-cff5d44 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {

	// Field is the field name.
	Field string `json:"field"`

	// Message is the error message.
	Message string `json:"message"`

	// Namespace is the namespace of the error.
	Namespace string `json:"namespace,omitempty"`

	// Value is the value of the field.
	Value interface{} `json:"value"`
}

type Srv

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

func New

func New() *Srv

func (*Srv) ValidateMap

func (s *Srv) ValidateMap(ctx context.Context, m map[string]interface{}, rules map[string]interface{}) error

ValidateMap validates the giveb struct.

func (*Srv) ValidateStruct

func (s *Srv) ValidateStruct(ctx context.Context, sc interface{}) error

ValidateStruct validates the given struct.

Jump to

Keyboard shortcuts

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