valid

package
v0.0.0-...-1775924 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parameter

func Parameter(key, value string) error

Parameter validates the same parameters as Query without the need to create url.Values.

func ParseQuery

func ParseQuery(s string) (string, string, error)

func ParseQueryTime

func ParseQueryTime(s string) (time.Time, error)

func Query

func Query(values url.Values) error

Query validates values and returns 400 errors for invalid, empty, or duplicate parameters. A query parameter that has no validator will return a 500 error. Implements weft.QueryValidator

Types

type Error

type Error struct {
	Code int
	Err  error
}

implements weft.Error

func (Error) Error

func (s Error) Error() string

func (Error) Status

func (s Error) Status() int

Jump to

Keyboard shortcuts

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