validators

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoValidator

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

func NewGoValidator

func NewGoValidator() *GoValidator

func (*GoValidator) Validate

func (g *GoValidator) Validate(params nucleo.Payload, schema map[string]interface{}) map[string]interface{}

type NewValidatorInput

type NewValidatorInput struct {
	Type nucleo.ValidatorType
}

type Validator

type Validator interface {
	Validate(params nucleo.Payload, schema interface{}) map[string]interface{}
	GetValidatorName() nucleo.ValidatorType
	Middlewares() nucleo.Middlewares
}

func NewValidator

func NewValidator(input NewValidatorInput) Validator

func Resolve

func Resolve(config nucleo.Config) Validator

type ValidatorContext

type ValidatorContext struct {
	Type        nucleo.ValidatorType
	GoValidator *GoValidator
}

func (ValidatorContext) GetValidatorName

func (validator ValidatorContext) GetValidatorName() nucleo.ValidatorType

func (ValidatorContext) Middleware

func (validator ValidatorContext) Middleware(rawCtx interface{}, next func(...interface{}))

func (ValidatorContext) Middlewares

func (validator ValidatorContext) Middlewares() nucleo.Middlewares

func (ValidatorContext) Validate

func (validator ValidatorContext) Validate(params nucleo.Payload, schema interface{}) map[string]interface{}

Jump to

Keyboard shortcuts

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