validators

package
v0.0.0-...-98ab9ba Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VIPAddress

type VIPAddress struct{}

func (VIPAddress) Validate

func (v VIPAddress) Validate(r *request.Request, paramName string) error

type VIsArray

type VIsArray struct{}

func (VIsArray) UpdateOpenAPISchema

func (v VIsArray) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsArray) Validate

func (VIsArray) Validate(r *request.Request, paramName string) (err error)

type VIsBool

type VIsBool struct{}

func (VIsBool) UpdateOpenAPISchema

func (v VIsBool) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsBool) Validate

func (VIsBool) Validate(r *request.Request, paramName string) (err error)

type VIsDate

type VIsDate struct {
	// The expected date format. This should be a string that specifies the expected format of the date, using the following standard Go date and time format codes: https://golang.org/pkg/time/#pkg-constants.
	// For example, to specify a date in the format "YYYY-MM-DD", you can set Format to "2006-01-02".
	Format string
}

func (VIsDate) UpdateOpenAPISchema

func (v VIsDate) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsDate) Validate

func (v VIsDate) Validate(r *request.Request, paramName string) error

type VIsEmail

type VIsEmail struct{}

func (VIsEmail) UpdateOpenAPISchema

func (v VIsEmail) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsEmail) Validate

func (v VIsEmail) Validate(r *request.Request, paramName string) error

type VIsFloat

type VIsFloat struct{}

func (VIsFloat) UpdateOpenAPISchema

func (v VIsFloat) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsFloat) Validate

func (VIsFloat) Validate(r *request.Request, paramName string) (err error)

type VIsInt

type VIsInt struct{}

func (VIsInt) UpdateOpenAPISchema

func (v VIsInt) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsInt) Validate

func (VIsInt) Validate(r *request.Request, paramName string) (err error)

type VIsMap

type VIsMap struct{}

func (VIsMap) UpdateOpenAPISchema

func (v VIsMap) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsMap) Validate

func (VIsMap) Validate(r *request.Request, paramName string) (err error)

type VIsString

type VIsString struct{}

func (VIsString) UpdateOpenAPISchema

func (v VIsString) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsString) Validate

func (VIsString) Validate(r *request.Request, paramName string) (err error)

type VIsTime

type VIsTime struct {
	// The expected format of the time string. This should be a string that specifies the expected format of the time, using the following standard Go date and time format codes: https://golang.org/pkg/time/#pkg-constants.
	// For example, to specify a time in the format "15:04:05", you can set Format to "15:04:05".
	Format string
}

func (VIsTime) UpdateOpenAPISchema

func (v VIsTime) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsTime) Validate

func (v VIsTime) Validate(r *request.Request, paramName string) error

type VIsURL

type VIsURL struct{}

func (VIsURL) UpdateOpenAPISchema

func (v VIsURL) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsURL) Validate

func (v VIsURL) Validate(r *request.Request, paramName string) error

type VIsUUID

type VIsUUID struct{}

func (VIsUUID) UpdateOpenAPISchema

func (v VIsUUID) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VIsUUID) Validate

func (v VIsUUID) Validate(r *request.Request, paramName string) error

type VPassword

type VPassword struct {
	MinLength      int
	MaxLength      int
	RequireSymbols bool
	RequireNumbers bool
	RequireUpper   bool
}

func (VPassword) UpdateOpenAPISchema

func (v VPassword) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VPassword) Validate

func (v VPassword) Validate(r *request.Request, paramName string) error

type VPhoneNumber

type VPhoneNumber struct {
	Prefix string
}

func (VPhoneNumber) Validate

func (v VPhoneNumber) Validate(r *request.Request, paramName string) error

type VRange

type VRange struct {
	Min float64
	Max float64
}

func (VRange) UpdateOpenAPISchema

func (v VRange) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VRange) Validate

func (v VRange) Validate(r *request.Request, paramName string) error

type VRegex

type VRegex struct {
	Regex string
}

func (VRegex) UpdateOpenAPISchema

func (v VRegex) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VRegex) Validate

func (v VRegex) Validate(r *request.Request, paramName string) error

type VRequired

type VRequired struct{}

func (VRequired) UpdateOpenAPISchema

func (v VRequired) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VRequired) Validate

func (VRequired) Validate(r *request.Request, paramName string) error

type VStringLength

type VStringLength struct {
	Min int
	Max int
}

func (VStringLength) UpdateOpenAPISchema

func (v VStringLength) UpdateOpenAPISchema(schema *openapi3.Schema)

func (VStringLength) Validate

func (v VStringLength) Validate(r *request.Request, paramName string) error

type Validator

type Validator interface {
	Validate(r *request.Request, paramName string) error
	UpdateOpenAPISchema(schema *openapi3.Schema)
}

Jump to

Keyboard shortcuts

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