constants

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceAPIVersionLabel defines what API version a resource belongs to
	// for filtering purposes.
	ResourceAPIVersionLabel = "resource.unikorn-cloud.org/api-version"
	// RegionLabel creates an indexable linkage between resources and their
	// owning region.
	RegionLabel = "regions.unikorn-cloud.org/region-id"
	// IdentityLabel creates an indexable linkage between resources and an
	// owning identity.
	IdentityLabel = "regions.unikorn-cloud.org/identity-id"
	// NetworkLabel creates an indexable linkage between resources
	// and an owning entity.
	NetworkLabel = "regions.unikorn-cloud.org/network-id"
	// SecurityGroupLabel creates an indexable linkage between resources
	// and an owning entity.
	SecurityGroupLabel = "regions.unikorn-cloud.org/security-group-id"
	// ServerLabel creates an indexable linkage between resources and an
	// owning entity.
	ServerLabel = "regions.unikorn-cloud.org/server-id"
)
View Source
const (
	ImageSourceTag      = "images.unikorn-cloud.org:source" // for the kind of source, e.g., import
	ImageSourceImport   = "import"
	ImageSourceSnapshot = "snapshot"
)

Variables

View Source
var (
	// Application is the application name.
	//nolint:gochecknoglobals
	Application = path.Base(os.Args[0])

	// Version is the application version set via the Makefile.
	//nolint:gochecknoglobals
	Version string

	// Revision is the git revision set via the Makefile.
	//nolint:gochecknoglobals
	Revision string
)

Functions

func MarshalAPIVersion added in v1.10.0

func MarshalAPIVersion(i int) string

func ServiceDescriptor added in v1.9.0

func ServiceDescriptor() util.ServiceDescriptor

func UnmarshalAPIVersion added in v1.10.0

func UnmarshalAPIVersion(s string) (int, error)

func VersionString

func VersionString() string

VersionString returns a canonical version string. It's based on HTTP's User-Agent so can be used to set that too, if this ever has to call out ot other micro services.

Types

This section is empty.

Jump to

Keyboard shortcuts

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