form

package
v0.0.0-...-897bb11 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Code generated by "enumerator -type YesNo -linecomment -empty"; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var YesNoValues = YesNoOptions{
	Yes: Yes,
	No:  No,
}

Functions

func DecodeAddress

func DecodeAddress(s string) *place.Address

func PostFormString

func PostFormString(r *http.Request, name string) string

Types

type AddressForm

type AddressForm struct {
	Action         string
	LookupPostcode string
	Address        *place.Address
}

func ReadAddressForm

func ReadAddressForm(r *http.Request) *AddressForm

func (*AddressForm) Validate

func (f *AddressForm) Validate(useYour bool) validation.List

type YesNo

type YesNo uint8
const (
	Yes YesNo = iota + 1 // yes
	No                   // no
)

func ParseYesNo

func ParseYesNo(s string) (YesNo, error)

func (YesNo) Empty

func (i YesNo) Empty() bool

func (YesNo) IsNo

func (i YesNo) IsNo() bool

func (YesNo) IsYes

func (i YesNo) IsYes() bool

func (YesNo) String

func (i YesNo) String() string

type YesNoForm

type YesNoForm struct {
	YesNo      YesNo
	Error      error
	ErrorLabel string
}

func ReadYesNoForm

func ReadYesNoForm(r *http.Request, errorLabel string) *YesNoForm

func (*YesNoForm) Validate

func (f *YesNoForm) Validate() validation.List

type YesNoOptions

type YesNoOptions struct {
	Yes YesNo
	No  YesNo
}

Jump to

Keyboard shortcuts

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