param

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 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 ValueBetween

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

func ValueGreaterThan

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

func ValueLessThan

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

Types

type ErrBadRequest

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

func (ErrBadRequest) Emit

func (br ErrBadRequest) Emit(w http.ResponseWriter)

func (ErrBadRequest) Error

func (br ErrBadRequest) Error() string

type Param

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

Jump to

Keyboard shortcuts

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