req

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingParam = errors.New("missing parameter")
	ErrInvalidParam = errors.New("invalid parameter")
)

Functions

This section is empty.

Types

type Values

type Values struct {
	*http.Request
}

func Params

func Params(r *http.Request) *Values

func (*Values) Bool

func (r *Values) Bool(param string) (bool, error)

func (*Values) BoolOr

func (r *Values) BoolOr(param string, def bool) bool

func (*Values) Int

func (r *Values) Int(param string) (int, error)

func (*Values) Int64

func (r *Values) Int64(param string) (int64, error)

func (*Values) Int64Or

func (r *Values) Int64Or(param string, def int64) int64

func (*Values) IntOr

func (r *Values) IntOr(param string, def int) int

func (*Values) Ints

func (r *Values) Ints(param string) ([]int, error)

func (*Values) String

func (r *Values) String(param string) (string, error)

func (*Values) StringOr

func (r *Values) StringOr(param, def string) string

func (*Values) Strings

func (r *Values) Strings(param string) ([]string, error)

func (*Values) TimeOr

func (r *Values) TimeOr(param string, def time.Time) time.Time

func (*Values) Times

func (r *Values) Times(param string) ([]time.Time, error)

Jump to

Keyboard shortcuts

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