constant

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 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 AICluster added in v0.7.0

type AICluster string // Always "ai_cluster"

func (AICluster) Default added in v0.7.0

func (c AICluster) Default() AICluster

func (AICluster) MarshalJSON added in v0.7.0

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

type AIVirtualCluster added in v0.7.0

type AIVirtualCluster string // Always "ai_virtual_cluster"

func (AIVirtualCluster) Default added in v0.7.0

func (c AIVirtualCluster) Default() AIVirtualCluster

func (AIVirtualCluster) MarshalJSON added in v0.7.0

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

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 Backup added in v0.7.0

type Backup string // Always "backup"

func (Backup) Default added in v0.7.0

func (c Backup) Default() Backup

func (Backup) MarshalJSON added in v0.7.0

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

type Baremetal added in v0.7.0

type Baremetal string // Always "baremetal"

func (Baremetal) Default added in v0.7.0

func (c Baremetal) Default() Baremetal

func (Baremetal) MarshalJSON added in v0.7.0

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

type BasicVm added in v0.7.0

type BasicVm string // Always "basic_vm"

func (BasicVm) Default added in v0.7.0

func (c BasicVm) Default() BasicVm

func (BasicVm) MarshalJSON added in v0.7.0

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

type Bytes added in v0.7.0

type Bytes string // Always "bytes"

func (Bytes) Default added in v0.7.0

func (c Bytes) Default() Bytes

func (Bytes) MarshalJSON added in v0.7.0

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

type Constant

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

type Containers added in v0.7.0

type Containers string // Always "containers"

func (Containers) Default added in v0.7.0

func (c Containers) Default() Containers

func (Containers) MarshalJSON added in v0.7.0

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

type DbaasPostgreSQLCPU added in v0.7.0

type DbaasPostgreSQLCPU string // Always "dbaas_postgresql_cpu"

func (DbaasPostgreSQLCPU) Default added in v0.7.0

func (DbaasPostgreSQLCPU) MarshalJSON added in v0.7.0

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

type DbaasPostgreSQLConnectionPooler added in v0.7.0

type DbaasPostgreSQLConnectionPooler string // Always "dbaas_postgresql_connection_pooler"

func (DbaasPostgreSQLConnectionPooler) Default added in v0.7.0

func (DbaasPostgreSQLConnectionPooler) MarshalJSON added in v0.7.0

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

type DbaasPostgreSQLMemory added in v0.7.0

type DbaasPostgreSQLMemory string // Always "dbaas_postgresql_memory"

func (DbaasPostgreSQLMemory) Default added in v0.7.0

func (DbaasPostgreSQLMemory) MarshalJSON added in v0.7.0

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

type DbaasPostgreSQLPublicNetwork added in v0.7.0

type DbaasPostgreSQLPublicNetwork string // Always "dbaas_postgresql_public_network"

func (DbaasPostgreSQLPublicNetwork) Default added in v0.7.0

func (DbaasPostgreSQLPublicNetwork) MarshalJSON added in v0.7.0

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

type DbaasPostgreSQLVolume added in v0.7.0

type DbaasPostgreSQLVolume string // Always "dbaas_postgresql_volume"

func (DbaasPostgreSQLVolume) Default added in v0.7.0

func (DbaasPostgreSQLVolume) MarshalJSON added in v0.7.0

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

type EgressTraffic added in v0.7.0

type EgressTraffic string // Always "egress_traffic"

func (EgressTraffic) Default added in v0.7.0

func (c EgressTraffic) Default() EgressTraffic

func (EgressTraffic) MarshalJSON added in v0.7.0

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

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 ExternalIP added in v0.7.0

type ExternalIP string // Always "external_ip"

func (ExternalIP) Default added in v0.7.0

func (c ExternalIP) Default() ExternalIP

func (ExternalIP) MarshalJSON added in v0.7.0

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

type FileShare added in v0.7.0

type FileShare string // Always "file_share"

func (FileShare) Default added in v0.7.0

func (c FileShare) Default() FileShare

func (FileShare) MarshalJSON added in v0.7.0

func (c FileShare) 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 Floatingip added in v0.7.0

type Floatingip string // Always "floatingip"

func (Floatingip) Default added in v0.7.0

func (c Floatingip) Default() Floatingip

func (Floatingip) MarshalJSON added in v0.7.0

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

type Functions added in v0.7.0

type Functions string // Always "functions"

func (Functions) Default added in v0.7.0

func (c Functions) Default() Functions

func (Functions) MarshalJSON added in v0.7.0

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

type FunctionsCalls added in v0.7.0

type FunctionsCalls string // Always "functions_calls"

func (FunctionsCalls) Default added in v0.7.0

func (c FunctionsCalls) Default() FunctionsCalls

func (FunctionsCalls) MarshalJSON added in v0.7.0

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

type FunctionsTraffic added in v0.7.0

type FunctionsTraffic string // Always "functions_traffic"

func (FunctionsTraffic) Default added in v0.7.0

func (c FunctionsTraffic) Default() FunctionsTraffic

func (FunctionsTraffic) MarshalJSON added in v0.7.0

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

type GB added in v0.7.0

type GB string // Always "GB"

func (GB) Default added in v0.7.0

func (c GB) Default() GB

func (GB) MarshalJSON added in v0.7.0

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

type GBs added in v0.7.0

type GBs string // Always "GBS"

func (GBs) Default added in v0.7.0

func (c GBs) Default() GBs

func (GBs) MarshalJSON added in v0.7.0

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

type Gbminutes added in v0.7.0

type Gbminutes string // Always "gbminutes"

func (Gbminutes) Default added in v0.7.0

func (c Gbminutes) Default() Gbminutes

func (Gbminutes) MarshalJSON added in v0.7.0

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

type GiB added in v0.7.0

type GiB string // Always "GiB"

func (GiB) Default added in v0.7.0

func (c GiB) Default() GiB

func (GiB) MarshalJSON added in v0.7.0

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

type HardReboot added in v0.20.0

type HardReboot string // Always "hard_reboot"

func (HardReboot) Default added in v0.20.0

func (c HardReboot) Default() HardReboot

func (HardReboot) MarshalJSON added in v0.20.0

func (c HardReboot) 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 Inference added in v0.7.0

type Inference string // Always "inference"

func (Inference) Default added in v0.7.0

func (c Inference) Default() Inference

func (Inference) MarshalJSON added in v0.7.0

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

type Instance added in v0.7.0

type Instance string // Always "instance"

func (Instance) Default added in v0.7.0

func (c Instance) Default() Instance

func (Instance) MarshalJSON added in v0.7.0

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

type LoadBalancer added in v0.7.0

type LoadBalancer string // Always "load_balancer"

func (LoadBalancer) Default added in v0.7.0

func (c LoadBalancer) Default() LoadBalancer

func (LoadBalancer) MarshalJSON added in v0.7.0

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

type LogIndex added in v0.7.0

type LogIndex string // Always "log_index"

func (LogIndex) Default added in v0.7.0

func (c LogIndex) Default() LogIndex

func (LogIndex) MarshalJSON added in v0.7.0

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

type Minutes added in v0.7.0

type Minutes string // Always "minutes"

func (Minutes) Default added in v0.7.0

func (c Minutes) Default() Minutes

func (Minutes) MarshalJSON added in v0.7.0

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

type Mls added in v0.7.0

type Mls string // Always "MLS"

func (Mls) Default added in v0.7.0

func (c Mls) Default() Mls

func (Mls) MarshalJSON added in v0.7.0

func (c Mls) 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 Public added in v0.18.0

type Public string // Always "public"

func (Public) Default added in v0.18.0

func (c Public) Default() Public

func (Public) MarshalJSON added in v0.18.0

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

type RedirectPrefix added in v0.22.0

type RedirectPrefix string // Always "REDIRECT_PREFIX"

func (RedirectPrefix) Default added in v0.22.0

func (c RedirectPrefix) Default() RedirectPrefix

func (RedirectPrefix) MarshalJSON added in v0.22.0

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

type RedirectToPool added in v0.22.0

type RedirectToPool string // Always "REDIRECT_TO_POOL"

func (RedirectToPool) Default added in v0.22.0

func (c RedirectToPool) Default() RedirectToPool

func (RedirectToPool) MarshalJSON added in v0.22.0

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

type RedirectToURL added in v0.22.0

type RedirectToURL string // Always "REDIRECT_TO_URL"

func (RedirectToURL) Default added in v0.22.0

func (c RedirectToURL) Default() RedirectToURL

func (RedirectToURL) MarshalJSON added in v0.22.0

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

type Reject added in v0.22.0

type Reject string // Always "REJECT"

func (Reject) Default added in v0.22.0

func (c Reject) Default() Reject

func (Reject) MarshalJSON added in v0.22.0

func (c Reject) 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 Resize added in v0.20.0

type Resize string // Always "resize"

func (Resize) Default added in v0.20.0

func (c Resize) Default() Resize

func (Resize) MarshalJSON added in v0.20.0

func (c Resize) 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 SoftReboot added in v0.20.0

type SoftReboot string // Always "soft_reboot"

func (SoftReboot) Default added in v0.20.0

func (c SoftReboot) Default() SoftReboot

func (SoftReboot) MarshalJSON added in v0.20.0

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

type Standard added in v0.6.0

type Standard string // Always "standard"

func (Standard) Default added in v0.6.0

func (c Standard) Default() Standard

func (Standard) MarshalJSON added in v0.6.0

func (c Standard) 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 Stop added in v0.20.0

type Stop string // Always "stop"

func (Stop) Default added in v0.20.0

func (c Stop) Default() Stop

func (Stop) MarshalJSON added in v0.20.0

func (c Stop) 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 Vast added in v0.6.0

type Vast string // Always "vast"

func (Vast) Default added in v0.6.0

func (c Vast) Default() Vast

func (Vast) MarshalJSON added in v0.6.0

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

type Volume added in v0.7.0

type Volume string // Always "volume"

func (Volume) Default added in v0.7.0

func (c Volume) Default() Volume

func (Volume) MarshalJSON added in v0.7.0

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

Jump to

Keyboard shortcuts

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