validator

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparable

type Comparable interface {
	constraints.Ordered | enum.Type | ~bool
}

type IValidator

type IValidator interface {
	IsValidInterface
	ValueInterface
}

type IsValidInterface

type IsValidInterface interface {
	IsValid() bool
}

type List

type List[T Comparable] struct {
	// contains filtered or unexported fields
}

func NewList

func NewList[T Comparable](list []T) *List[T]

func (*List[T]) IsValid

func (r *List[T]) IsValid() bool

func (*List[T]) Value

func (r *List[T]) Value(v interface{}) IsValidInterface

type Range

type Range[T constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func NewRange

func NewRange[T constraints.Ordered](inf, sup T) *Range[T]

func (*Range[T]) IsValid

func (r *Range[T]) IsValid() bool

func (*Range[T]) Value

func (r *Range[T]) Value(v interface{}) IsValidInterface

type Regex

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

func NewRegex

func NewRegex(exp string) *Regex

func (*Regex) IsValid

func (r *Regex) IsValid() bool

func (*Regex) Value

func (r *Regex) Value(val interface{}) IsValidInterface

type Value

type Value[T Comparable] struct {
	// contains filtered or unexported fields
}

func NewValue

func NewValue[T Comparable](v T) *Value[T]

func (*Value[T]) IsValid

func (r *Value[T]) IsValid() bool

func (*Value[T]) Value

func (r *Value[T]) Value(v interface{}) IsValidInterface

type ValueInterface

type ValueInterface interface {
	Value(val interface{}) IsValidInterface
}

Jump to

Keyboard shortcuts

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