form

package
v0.938.0-weblatemc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 8 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 FieldNames = Names{
	LanguagePreference: "language-preference",
}
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 LanguagePreferenceForm added in v0.884.0

type LanguagePreferenceForm struct {
	Preference localize.Lang
	Error      error
	ErrorLabel string
}

func ReadLanguagePreferenceForm added in v0.884.0

func ReadLanguagePreferenceForm(r *http.Request, errorLabel string) *LanguagePreferenceForm

func (*LanguagePreferenceForm) Validate added in v0.884.0

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

type Names added in v0.884.0

type Names struct {
	LanguagePreference string
}

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) MarshalText added in v0.912.0

func (i YesNo) MarshalText() ([]byte, error)

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