constant

package
v6.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueOf

func ValueOf[T Constant[T]]() T

ValueOf gives the default value of a constant from its type. It's helpful when constructing constants as variants in a one-of. Note that empty structs are marshalled by default. Usage: constant.ValueOf[constant.Foo]()

Types

type ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy

type ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy string // Always "By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."

func (ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy) Default

func (ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy) MarshalJSON

type Cancelled

type Cancelled string // Always "cancelled"

func (Cancelled) Default

func (c Cancelled) Default() Cancelled

func (Cancelled) MarshalJSON

func (c Cancelled) MarshalJSON() ([]byte, error)

type ChooseYourUsername

type ChooseYourUsername string // Always "Choose your username"

func (ChooseYourUsername) Default

func (ChooseYourUsername) MarshalJSON

func (c ChooseYourUsername) MarshalJSON() ([]byte, error)

type Code

type Code string // Always "code"

func (Code) Default

func (c Code) Default() Code

func (Code) MarshalJSON

func (c Code) MarshalJSON() ([]byte, error)

type Complete

type Complete string // Always "complete"

func (Complete) Default

func (c Complete) Default() Complete

func (Complete) MarshalJSON

func (c Complete) MarshalJSON() ([]byte, error)

type Constant

type Constant[T any] interface {
	Default() T
}

type Continue

type Continue string // Always "Continue"

func (Continue) Default

func (c Continue) Default() Continue

func (Continue) MarshalJSON

func (c Continue) MarshalJSON() ([]byte, error)

type Cookies

type Cookies string // Always "cookies"

func (Cookies) Default

func (c Cookies) Default() Cookies

func (Cookies) MarshalJSON

func (c Cookies) MarshalJSON() ([]byte, error)

type DisplayAndWait

type DisplayAndWait string // Always "display_and_wait"

func (DisplayAndWait) Default

func (c DisplayAndWait) Default() DisplayAndWait

func (DisplayAndWait) MarshalJSON

func (c DisplayAndWait) MarshalJSON() ([]byte, error)

type Emoji

type Emoji string // Always "emoji"

func (Emoji) Default

func (c Emoji) Default() Emoji

func (Emoji) MarshalJSON

func (c Emoji) MarshalJSON() ([]byte, error)

type Nothing

type Nothing string // Always "nothing"

func (Nothing) Default

func (c Nothing) Default() Nothing

func (Nothing) MarshalJSON

func (c Nothing) MarshalJSON() ([]byte, error)

type QR

type QR string // Always "qr"

func (QR) Default

func (c QR) Default() QR

func (QR) MarshalJSON

func (c QR) MarshalJSON() ([]byte, error)

type Removed

type Removed string // Always "removed"

func (Removed) Default

func (c Removed) Default() Removed

func (Removed) MarshalJSON

func (c Removed) MarshalJSON() ([]byte, error)

type UserInput

type UserInput string // Always "user_input"

func (UserInput) Default

func (c UserInput) Default() UserInput

func (UserInput) MarshalJSON

func (c UserInput) MarshalJSON() ([]byte, error)

type Username

type Username string // Always "Username"

func (Username) Default

func (c Username) Default() Username

func (Username) MarshalJSON

func (c Username) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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