forms

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func GetBool

func GetBool(lookup LookupString, name string, required bool) (bool, bool, error)

func GetEnum

func GetEnum[T comparable](lookup LookupString, name string, required bool, parser func(string) T) (T, bool, error)

func GetEnumArray

func GetEnumArray[T comparable](fn LookupString, name string, required bool, parser func(string) T) ([]T, bool, error)

func GetInt

func GetInt(lookup LookupString, name string, required bool) (int, bool, error)

func GetInt32

func GetInt32(lookup LookupString, name string, required bool) (int32, bool, error)

func GetInt32Array

func GetInt32Array(lookup LookupString, name string, required bool) ([]int32, bool, error)

func GetInt64

func GetInt64(lookup LookupString, name string, required bool) (int64, bool, error)

func GetString

func GetString(lookup LookupString, name string, required bool) (string, bool, error)

func GetStringArray

func GetStringArray(lookup LookupString, name string, required bool) ([]string, bool, error)

func GetTime

func GetTime(lookup LookupString, name string, required bool) (time.Time, bool, error)

func GetUUID

func GetUUID(lookup LookupString, name string, required bool) (uuid.UUID, bool, error)

Types

type File

type File struct {
	File     io.ReadCloser
	Filename string
	Header   textproto.MIMEHeader
	Size     int64
}

func GetFile

func GetFile(r *http.Request, name string, required bool) (File, bool, error)

type LookupString

type LookupString func(key string) string

Jump to

Keyboard shortcuts

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