validerare

package module
v0.0.0-...-3270831 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Type

func Type[T any](data any) error

Types

type A

type A []Validator

type M

type M map[string]Validator

type V

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

func New

func New() *V

func (*V) Body

func (v *V) Body(schema Validator) *V

func (*V) Headers

func (v *V) Headers(schema map[string]Validator) *V

func (*V) Params

func (v *V) Params(schema map[string]Validator) *V

func (*V) Queries

func (v *V) Queries(schema map[string]Validator) *V

func (*V) Validate

func (v *V) Validate(headers http.Header, params, queries map[string]string, body []byte) error

type Validator

type Validator func(data any) error

func Object

func Object(properties M) Validator

func Value

func Value(value any) Validator

Directories

Path Synopsis
pkg
fiber Module

Jump to

Keyboard shortcuts

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