param

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidParam = errors.New("Failed to get parameter")

ErrInvalidParam is an error for not presented or invalid parameter

Functions

func Bool

func Bool(r *http.Request, key string) (bool, error)

Bool returns a path parameter as a boolean type

func Float32

func Float32(r *http.Request, key string) (float32, error)

Float32 returns a path parameter as a float32 type

func Float64

func Float64(r *http.Request, key string) (float64, error)

Float64 returns a path parameter as a float64 type

func Int

func Int(r *http.Request, key string) (int, error)

Int returns a path parameter as an int type

func Int16

func Int16(r *http.Request, key string) (int16, error)

Int16 returns a path parameter as an int16 type

func Int32

func Int32(r *http.Request, key string) (int32, error)

Int32 returns a path parameter as an int32 type

func Int64

func Int64(r *http.Request, key string) (int64, error)

Int64 returns a path parameter as an int64 type

func Int8

func Int8(r *http.Request, key string) (int8, error)

Int8 returns a path parameter as an int8 type

func QueryBool

func QueryBool(r *http.Request, key string) (bool, error)

QueryBool returns a query parameter with boolean type

func QueryBoolArray

func QueryBoolArray(r *http.Request, key string) ([]bool, error)

QueryBoolArray returns a slice of query parameters with boolean type

func QueryFloat32

func QueryFloat32(r *http.Request, key string) (float32, error)

QueryFloat32 returns a query parameter with float32 type

func QueryFloat32Array

func QueryFloat32Array(r *http.Request, key string) ([]float32, error)

QueryFloat32Array returns a slice of query parameters with float32 type

func QueryFloat64

func QueryFloat64(r *http.Request, key string) (float64, error)

QueryFloat64 returns a query parameter with float64 type

func QueryFloat64Array

func QueryFloat64Array(r *http.Request, key string) ([]float64, error)

QueryFloat64Array returns a slice of query parameters with float64 type

func QueryInt

func QueryInt(r *http.Request, key string) (int, error)

QueryInt returns a query parameter with int type

func QueryInt16

func QueryInt16(r *http.Request, key string) (int16, error)

QueryInt16 returns a query parameter with int16 type

func QueryInt16Array

func QueryInt16Array(r *http.Request, key string) ([]int16, error)

QueryInt16Array returns a slice of query parameters with int16 type

func QueryInt32

func QueryInt32(r *http.Request, key string) (int32, error)

QueryInt32 returns a query parameter with int32 type

func QueryInt32Array

func QueryInt32Array(r *http.Request, key string) ([]int32, error)

QueryInt32Array returns a slice of query parameters with int32 type

func QueryInt64

func QueryInt64(r *http.Request, key string) (int64, error)

QueryInt64 returns a query parameter with int64 type

func QueryInt64Array

func QueryInt64Array(r *http.Request, key string) ([]int64, error)

QueryInt64Array returns a slice of query parameters with int64 type

func QueryInt8

func QueryInt8(r *http.Request, key string) (int8, error)

QueryInt8 returns a query parameter with int8 type

func QueryInt8Array

func QueryInt8Array(r *http.Request, key string) ([]int8, error)

QueryInt8Array returns a slice of query parameters with int8 type

func QueryIntArray

func QueryIntArray(r *http.Request, key string) ([]int, error)

QueryIntArray returns a slice of query parameters with int type

func QueryString

func QueryString(r *http.Request, key string) (string, error)

QueryString returns a query parameter with string type

func QueryStringArray

func QueryStringArray(r *http.Request, key string) ([]string, error)

QueryStringArray returns a slice of query parameters with string type

func QueryUint

func QueryUint(r *http.Request, key string) (uint, error)

QueryUint returns a query parameter with uint type

func QueryUint16

func QueryUint16(r *http.Request, key string) (uint16, error)

QueryUint16 returns a query parameter with uint16 type

func QueryUint16Array

func QueryUint16Array(r *http.Request, key string) ([]uint16, error)

QueryUint16Array returns a slice of query parameters with uint16 type

func QueryUint32

func QueryUint32(r *http.Request, key string) (uint32, error)

QueryUint32 returns a query parameter with uint32 type

func QueryUint32Array

func QueryUint32Array(r *http.Request, key string) ([]uint32, error)

QueryUint32Array returns a slice of query parameters with uint32 type

func QueryUint64

func QueryUint64(r *http.Request, key string) (uint64, error)

QueryUint64 returns a query parameter with uint64 type

func QueryUint64Array

func QueryUint64Array(r *http.Request, key string) ([]uint64, error)

QueryUint64Array returns a slice of query parameters with uint64 type

func QueryUint8

func QueryUint8(r *http.Request, key string) (uint8, error)

QueryUint8 returns a query parameter with uint8 type

func QueryUint8Array

func QueryUint8Array(r *http.Request, key string) ([]uint8, error)

QueryUint8Array returns a slice of query parameters with uint8 type

func QueryUintArray

func QueryUintArray(r *http.Request, key string) ([]uint, error)

QueryUintArray returns a slice of query parameters with uint type

func String

func String(r *http.Request, key string) (string, error)

String returns a path parameter as a string type

func Uint

func Uint(r *http.Request, key string) (uint, error)

Uint returns a path parameter as an uint type

func Uint16

func Uint16(r *http.Request, key string) (uint16, error)

Uint16 returns a path parameter as an uint16 type

func Uint32

func Uint32(r *http.Request, key string) (uint32, error)

Uint32 returns a path parameter as an uint32 type

func Uint64

func Uint64(r *http.Request, key string) (uint64, error)

Uint64 returns a path parameter as an uint64 type

func Uint8

func Uint8(r *http.Request, key string) (uint8, error)

Uint8 returns a path parameter as an uint8 type

Types

This section is empty.

Jump to

Keyboard shortcuts

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