param

package
v2.0.0-alpha.49 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LengthBetween

func LengthBetween(min, max int) *checker

func New

func New[T paramTypes](key string) *param[T]

func NewChecker

func NewChecker() *checker

func TextHasPrefix

func TextHasPrefix(pfx string, caseFold bool) *checker

func TextHasSuffix

func TextHasSuffix(sfx string, caseFold bool) *checker

func TextIsOneOf

func TextIsOneOf(vs ...string) *checker

func TextMatches

func TextMatches(expr string) *checker

func ValueBetween

func ValueBetween[T numbers](min, max T) *checker

func ValueGreaterThan

func ValueGreaterThan[T numbers](min T) *checker

func ValueIsOneOf

func ValueIsOneOf[T paramTypes](vs ...T) *checker

func ValueLessThan

func ValueLessThan[T numbers](max T) *checker

Types

type Param

type Param interface {
	Default() *string
	Help() []string
	Name() string
	Parse(url.Values) ([]any, string, []any)
	Required() bool
	Rules() [][]string
	Type() string
}

Jump to

Keyboard shortcuts

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