form

package
v1.0.88 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default is the default form field
	Default = make(url.Values)

	// FormMonoid is the [M.Monoid] for the [Endomorphism]
	Monoid = ENDO.Monoid[url.Values]()

	// AtValues is a [L.Lens] that focusses on the values of a form field
	AtValues = LRG.AtRecord[url.Values, []string]

	// AtValue is a [L.Lens] that focusses on first value in form fields
	AtValue = F.Flow2(
		AtValues,
		composeHead,
	)
)

Functions

func WithValue

func WithValue(name string) func(value string) Endomorphism

WithValue creates a [FormBuilder] for a certain field

Types

type Endomorphism added in v1.0.77

type Endomorphism = ENDO.Endomorphism[url.Values]

Endomorphism returns an [ENDO.Endomorphism] that transforms a form

func WithoutValue

func WithoutValue(name string) Endomorphism

WithoutValue creates a [FormBuilder] that removes a field

Jump to

Keyboard shortcuts

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