toggle

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gettable

type Gettable interface {
	// For example, url.Values
	Get(string) string
}

type Toggle

type Toggle struct {
	Label    string `json:"-"`
	Key      string `json:"key"`
	Category string `json:"-"`
	State    bool   `json:"state"`
	HelpText string `json:"-"`
}

type Toggles

type Toggles []Toggle

func (Toggles) ByCategory

func (this Toggles) ByCategory(category string) []Toggle

func (Toggles) ByKey

func (this Toggles) ByKey(key string) Toggle

func (Toggles) Categories

func (this Toggles) Categories() []string

func (*Toggles) FromForm

func (this *Toggles) FromForm(form Gettable)

func (Toggles) List

func (this Toggles) List() []Toggle

func (*Toggles) Populate

func (this *Toggles) Populate(validToggles []Toggle)

func (*Toggles) Scan

func (this *Toggles) Scan(value interface{}) error

func (Toggles) Value

func (this Toggles) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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