validator

package
v0.7.23 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilValidateFn       = errors.New("validate function is nil")
	ErrInvalidValidateFn   = errors.New("validate function is invalid")
	ErrNilCreateValidateFn = errors.New("create validate function is nil")
	ErrNilParametersValues = errors.New("parameters value is nil")
)

Functions

This section is empty.

Types

type Middleware

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

Middleware struct

func NewMiddleware

NewMiddleware creates a new Middleware instance

func (*Middleware) Validate

func (m *Middleware) Validate(
	body interface{},
	auxiliaryValidatorFns ...interface{},
) func(next http.Handler) http.Handler

Validate validates the request body and stores it in the context

type Validator

type Validator interface {
	Validate(
		body,
		auxiliaryValidatorFn interface{},
	) func(next http.Handler) http.Handler
}

Validator interface

Jump to

Keyboard shortcuts

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