constant

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 1 Imported by: 1 module, 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 AnySubnet

type AnySubnet string // Always "any_subnet"

func (AnySubnet) Default

func (c AnySubnet) Default() AnySubnet

func (AnySubnet) MarshalJSON

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

type Apptemplate

type Apptemplate string // Always "apptemplate"

func (Apptemplate) Default

func (c Apptemplate) Default() Apptemplate

func (Apptemplate) MarshalJSON

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

type Constant

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

type Existing

type Existing string // Always "existing"

func (Existing) Default

func (c Existing) Default() Existing

func (Existing) MarshalJSON

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

type ExistingVolume

type ExistingVolume string // Always "existing-volume"

func (ExistingVolume) Default

func (c ExistingVolume) Default() ExistingVolume

func (ExistingVolume) MarshalJSON

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

type External

type External string // Always "external"

func (External) Default

func (c External) Default() External

func (External) MarshalJSON

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

type Fixed

type Fixed string // Always "fixed"

func (Fixed) Default

func (c Fixed) Default() Fixed

func (Fixed) MarshalJSON

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

type Floating

type Floating string // Always "floating"

func (Floating) Default

func (c Floating) Default() Floating

func (Floating) MarshalJSON

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

type IPAddress

type IPAddress string // Always "ip_address"

func (IPAddress) Default

func (c IPAddress) Default() IPAddress

func (IPAddress) MarshalJSON

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

type Image

type Image string // Always "image"

func (Image) Default

func (c Image) Default() Image

func (Image) MarshalJSON

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

type New

type New string // Always "new"

func (New) Default

func (c New) Default() New

func (New) MarshalJSON

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

type NewVolume

type NewVolume string // Always "new-volume"

func (NewVolume) Default

func (c NewVolume) Default() NewVolume

func (NewVolume) MarshalJSON

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

type Nfs

type Nfs string // Always "NFS"

func (Nfs) Default

func (c Nfs) Default() Nfs

func (Nfs) MarshalJSON

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

type Port

type Port string // Always "port"

func (Port) Default

func (c Port) Default() Port

func (Port) MarshalJSON

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

type ReservedFixedIP

type ReservedFixedIP string // Always "reserved_fixed_ip"

func (ReservedFixedIP) Default

func (c ReservedFixedIP) Default() ReservedFixedIP

func (ReservedFixedIP) MarshalJSON

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

type Snapshot

type Snapshot string // Always "snapshot"

func (Snapshot) Default

func (c Snapshot) Default() Snapshot

func (Snapshot) MarshalJSON

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

type Start

type Start string // Always "start"

func (Start) Default

func (c Start) Default() Start

func (Start) MarshalJSON

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

type Subnet

type Subnet string // Always "subnet"

func (Subnet) Default

func (c Subnet) Default() Subnet

func (Subnet) MarshalJSON

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

type VastShareType

type VastShareType string // Always "vast_share_type"

func (VastShareType) Default

func (c VastShareType) Default() VastShareType

func (VastShareType) MarshalJSON

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

Jump to

Keyboard shortcuts

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