constants

package
v6.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagDatacenterId    = "datacenter-id"
	FlagSnapshotId      = "snapshot-id"
	FlagIdShort         = "i"
	FlagName            = "name"
	FlagNameShort       = "n"
	FlagTemplate        = "template"
	FlagTemplateId      = "template-id"
	FlagInstances       = "instances"
	FlagShards          = "shards"
	FlagMaintenanceTime = "maintenance-time"
	FlagMaintenanceDay  = "maintenance-day"
	FlagLocation        = "location"
	FlagLocationShort   = "l"
	FlagOffset          = "offset"
	// DescAuthenticationOrder explains auth order. Embed this in any auth-related commands
	DescAuthenticationOrder = `` /* 579-byte string literal not displayed */

	FlagMaxResults      = "max-results"
	FlagMaxResultsShort = "M"
	FlagCidr            = "cidr"
	FlagLanId           = "lan-id"
	FlagEdition         = "edition"

	FlagCores                 = "cores"
	FlagRam                   = "ram"
	FlagAvailabilityZone      = "availability-zone"
	FlagAvailabilityZoneShort = "z"
	FlagCpuFamily             = "cpu-family"
	FlagStorageType           = "storage-type"
	FlagStorageSize           = "storage-size"

	FlagClusterId        = "cluster-id"
	FlagNodepoolId       = "nodepool-id"
	FlagNodeCount        = "node-count"
	FlagLabels           = "labels"
	FlagLabelsShort      = "L"
	FlagAnnotations      = "annotations"
	FlagAnnotationsShort = "A"
	FlagVersion          = "version"

	FlagZone        = "zone"
	FlagZoneShort   = "z"
	FlagRecord      = "record"
	FlagRecordShort = "r"
	FlagState       = "state"
	FlagDescription = "description"
	FlagEnabled     = "enabled"
	FlagContent     = "content"
	FlagTtl         = "ttl"
	FlagPriority    = "priority"
	FlagType        = "type"

	FlagCloudInit = "cloud-init"
)

flags

View Source
const (
	DescMaxResults = "The maximum number of elements to return"
	DescZone       = "The name or ID of the DNS zone"
)

Flag descriptions. Prefixed with "Desc" for easy find and replace

View Source
const (
	ArgOutput       = "output"
	ArgOutputShort  = "o"
	ArgQuiet        = "quiet"
	ArgQuietShort   = "q"
	ArgVerbose      = "verbose"
	ArgVerboseShort = "v"
	ArgDepth        = "depth"
	ArgDepthShort   = "D"

	ArgAll                 = "all"
	ArgAllShort            = "a"
	ArgForce               = "force"
	ArgForceShort          = "f"
	ArgWaitForRequest      = "wait-for-request"
	ArgWaitForRequestShort = "w"
	ArgWaitForState        = "wait-for-state"
	ArgWaitForDelete       = "wait-for-deletion"
	ArgWaitForStateShort   = "W"
	ArgTimeout             = "timeout"
	ArgTimeoutShort        = "t"
	ArgCols                = "cols"
	ArgUpdates             = "updates"
	ArgUser                = "user"
	ArgPassword            = "password"
	ArgPasswordShort       = "p"
	ArgNoHeaders           = "no-headers"
)

legacy flags. TODO: Arg should be renamed to Flag.

View Source
const (
	DefaultApiURL         = "https://api.ionos.com"
	DefaultDnsApiURL      = "dns.de-fra.ionos.com"
	DefaultConfigFileName = "/config.json"
	DefaultOutputFormat   = "text"
	DefaultWait           = false
	DefaultTimeoutSeconds = int(60)
	DefaultParentIndex    = int(1)
)

Defaults

View Source
const (
	MessageRequestInfo = "Request ID: %v Execution Time: %v"
	MessageRequestTime = "Request Execution Time: %v"
	MessageDeletingAll = "Status: Deleting %v with ID: %v..."
	MessageRemovingAll = "Status: Removing %v with ID: %v..." // TODO: cleanup constant. reduce duplication
)

Some legacy messages, which might need looking into

View Source
const (
	ErrDeleteAll     = "error occurred removing %v with ID: %v. error: %w"
	ErrWaitDeleteAll = "error occurred waiting on removing %v with ID: %v. error: %w" // TODO: cleanup constant. reduce duplication
)
View Source
const (
	ArgConfig         = "config"
	ArgConfigShort    = "c"
	ArgServerUrl      = "api-url"
	ArgServerUrlShort = "u"
	ArgToken          = "token"
	ArgTokenShort     = "t"

	EnvUsername  = "IONOS_USERNAME"
	EnvPassword  = "IONOS_PASSWORD"
	EnvToken     = "IONOS_TOKEN"
	EnvServerUrl = "IONOS_API_URL"

	CfgToken     = "userdata.token"
	CfgServerUrl = "userdata.api-url"
	CfgUsername  = "userdata.name"
	CfgPassword  = "userdata.password"

	CLIHttpUserAgent = "cli-user-agent"

	FlagProvenance      = "provenance"
	FlagProvenanceShort = "p"
	FlagSkipVerify      = "skip-verify"
)

Config

View Source
const (
	DatacenterId              = "Datacenter ID: %v"
	ApplicationLoadBalancerId = "Application Load Balancer ID: %v"
	TargetGroupId             = "Target Group ID: %v"
	ClusterId                 = "Cluster ID: %v"
	ForwardingRuleId          = "Forwarding Rule ID: %v"
)

Resource info

Variables

View Source
var (
	EnumLicenceType = []string{"LINUX", "RHEL", "WINDOWS", "WINDOWS2016", "UNKNOWN", "OTHER"}
)

enum values. TODO: ideally i'd like these handled by the SDK

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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