validation

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument[T any] struct {
	Name     string
	Variable T
}

func Arg

func Arg[T any](name string, variable T) Argument[T]

type BatchConfigValidation

type BatchConfigValidation struct {
	SliceValidators []SliceValidator
	Exact           bool
}

func (BatchConfigValidation) Validate

func (v BatchConfigValidation) Validate() error

type SlicePairToValidate

type SlicePairToValidate[T any] struct {
	Slice Argument[[]T]
	Bool  Argument[*bool]
}

type SliceValidator

type SliceValidator interface {
	// contains filtered or unexported methods
}

type TypeValidation

type TypeValidation struct {
	TypeMap       map[string]int
	NamedTypesMap map[string]string

	CurParamName    string
	CurParamType    string
	CurNameInParams bool
}

func (TypeValidation) GetParamType

func (v TypeValidation) GetParamType(name string) string

func (*TypeValidation) HasExhausted

func (v *TypeValidation) HasExhausted(paramType string) bool

func (*TypeValidation) SetNameInParams

func (v *TypeValidation) SetNameInParams(name string)

func (*TypeValidation) SetParamInfo

func (v *TypeValidation) SetParamInfo(name string, paramType string)

func (*TypeValidation) SetParamName

func (v *TypeValidation) SetParamName(name string)

func (*TypeValidation) SetParamType

func (v *TypeValidation) SetParamType(paramType string)

func (TypeValidation) TypeExclExists

func (v TypeValidation) TypeExclExists() bool

func (TypeValidation) TypeExists

func (v TypeValidation) TypeExists() bool

Jump to

Keyboard shortcuts

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