params

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STRING       string = "string"
	BOOL         string = "bool"
	INT          string = "int"
	INT32        string = "int32"
	INT64        string = "int64"
	FLOAT32      string = "float32"
	FLOAT64      string = "float64"
	SHORT_DATE   string = "shortDate" // 2006-01-02
	RFC3339_DATE string = "rfc3339Date"
)

Variables

This section is empty.

Functions

func ENUM

func ENUM(values ...string) []string

func GetAsBool

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

func GetAsFloat32

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

func GetAsInt

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

func GetAsInt32

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

func GetAsInt64

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

func GetAsString

func GetAsString(key string, r *http.Request) *string

func GetAsTime

func GetAsTime(key string, r *http.Request) *time.Time

func ParseBool

func ParseBool(value string, key string, validatedMap R, errors *[]error)

func ParseDate

func ParseDate(value string, key string, format string, validatedMap R, errors *[]error)

func ParseEnum

func ParseEnum(value string, enum []string, key string, validatedMap R, errors *[]error)

func ParseFloat

func ParseFloat(value string, key string, bits int, validatedMap R, errors *[]error)

func ParseInt

func ParseInt(value string, key string, bits int, validatedMap R, errors *[]error)

func ParseString added in v1.0.31

func ParseString(value string, key string, validatedMap R, errors *[]error)

func ValidateParams

func ValidateParams(requirement R, actual map[string]string, destination R, required bool) error

Types

type R

type R map[string]interface{}

Jump to

Keyboard shortcuts

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