constant

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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 AppleOAuth added in v0.1.1

type AppleOAuth string // Always "apple_oauth"

func (AppleOAuth) Default added in v0.1.1

func (c AppleOAuth) Default() AppleOAuth

func (AppleOAuth) MarshalJSON added in v0.1.1

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

type Constant

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

type CustomAuth added in v0.1.1

type CustomAuth string // Always "custom_auth"

func (CustomAuth) Default added in v0.1.1

func (c CustomAuth) Default() CustomAuth

func (CustomAuth) MarshalJSON added in v0.1.1

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

type DiscordOAuth added in v0.1.1

type DiscordOAuth string // Always "discord_oauth"

func (DiscordOAuth) Default added in v0.1.1

func (c DiscordOAuth) Default() DiscordOAuth

func (DiscordOAuth) MarshalJSON added in v0.1.1

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

type Email added in v0.1.1

type Email string // Always "email"

func (Email) Default added in v0.1.1

func (c Email) Default() Email

func (Email) MarshalJSON added in v0.1.1

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

type Farcaster added in v0.1.1

type Farcaster string // Always "farcaster"

func (Farcaster) Default added in v0.1.1

func (c Farcaster) Default() Farcaster

func (Farcaster) MarshalJSON added in v0.1.1

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

type GitHubOAuth added in v0.1.1

type GitHubOAuth string // Always "github_oauth"

func (GitHubOAuth) Default added in v0.1.1

func (c GitHubOAuth) Default() GitHubOAuth

func (GitHubOAuth) MarshalJSON added in v0.1.1

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

type GoogleOAuth added in v0.1.1

type GoogleOAuth string // Always "google_oauth"

func (GoogleOAuth) Default added in v0.1.1

func (c GoogleOAuth) Default() GoogleOAuth

func (GoogleOAuth) MarshalJSON added in v0.1.1

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

type InstagramOAuth added in v0.1.1

type InstagramOAuth string // Always "instagram_oauth"

func (InstagramOAuth) Default added in v0.1.1

func (c InstagramOAuth) Default() InstagramOAuth

func (InstagramOAuth) MarshalJSON added in v0.1.1

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

type LineOAuth added in v0.1.1

type LineOAuth string // Always "line_oauth"

func (LineOAuth) Default added in v0.1.1

func (c LineOAuth) Default() LineOAuth

func (LineOAuth) MarshalJSON added in v0.1.1

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

type LinkedinOAuth added in v0.1.1

type LinkedinOAuth string // Always "linkedin_oauth"

func (LinkedinOAuth) Default added in v0.1.1

func (c LinkedinOAuth) Default() LinkedinOAuth

func (LinkedinOAuth) MarshalJSON added in v0.1.1

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

type Passkey added in v0.1.1

type Passkey string // Always "passkey"

func (Passkey) Default added in v0.1.1

func (c Passkey) Default() Passkey

func (Passkey) MarshalJSON added in v0.1.1

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

type Phone added in v0.1.1

type Phone string // Always "phone"

func (Phone) Default added in v0.1.1

func (c Phone) Default() Phone

func (Phone) MarshalJSON added in v0.1.1

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

type SpotifyOAuth added in v0.1.1

type SpotifyOAuth string // Always "spotify_oauth"

func (SpotifyOAuth) Default added in v0.1.1

func (c SpotifyOAuth) Default() SpotifyOAuth

func (SpotifyOAuth) MarshalJSON added in v0.1.1

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

type Telegram added in v0.1.1

type Telegram string // Always "telegram"

func (Telegram) Default added in v0.1.1

func (c Telegram) Default() Telegram

func (Telegram) MarshalJSON added in v0.1.1

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

type TiktokOAuth added in v0.1.1

type TiktokOAuth string // Always "tiktok_oauth"

func (TiktokOAuth) Default added in v0.1.1

func (c TiktokOAuth) Default() TiktokOAuth

func (TiktokOAuth) MarshalJSON added in v0.1.1

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

type TwitchOAuth added in v0.1.1

type TwitchOAuth string // Always "twitch_oauth"

func (TwitchOAuth) Default added in v0.1.1

func (c TwitchOAuth) Default() TwitchOAuth

func (TwitchOAuth) MarshalJSON added in v0.1.1

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

type TwitterOAuth added in v0.1.1

type TwitterOAuth string // Always "twitter_oauth"

func (TwitterOAuth) Default added in v0.1.1

func (c TwitterOAuth) Default() TwitterOAuth

func (TwitterOAuth) MarshalJSON added in v0.1.1

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

type Wallet added in v0.1.1

type Wallet string // Always "wallet"

func (Wallet) Default added in v0.1.1

func (c Wallet) Default() Wallet

func (Wallet) MarshalJSON added in v0.1.1

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

Jump to

Keyboard shortcuts

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