create

package
v1.21.0 Latest Latest
Warning

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

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

Documentation

Overview

Package create provides functionality to create resources in the nine.ch API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MySQLKongVars

func MySQLKongVars() kong.Vars

MySQLKongVars returns all variables which are used in the MySQL create command

func ServiceConnectionKongVars

func ServiceConnectionKongVars() kong.Vars

ServiceConnectionKongVars returns the variables which only the service connection create command interpolates. The variables of the flags it shares with the update command come from serviceconnection.KongVars.

Types

type Cmd

type Cmd struct {
	FromFile            fromFile             `cmd:"" group:"create-general" default:"withargs" name:"-f <file>" help:"Create any resource from a yaml or json file."`
	VCluster            vclusterCmd          `cmd:"" group:"create-infra" name:"vcluster" help:"Create a new vcluster."`
	APIServiceAccount   apiServiceAccountCmd `cmd:"" group:"create-access" name:"apiserviceaccount" aliases:"asa" help:"Create a new API Service Account."`
	Project             projectCmd           `cmd:"" group:"create-access" name:"project" help:"Create a new project."`
	Config              configCmd            `cmd:"" group:"create-apps" name:"config"  help:"Create a new deplo.io Project Configuration."`
	Application         applicationCmd       `cmd:"" group:"create-apps" name:"application" aliases:"app,application" help:"Create a new deplo.io Application."`
	MySQL               mySQLCmd             `cmd:"" group:"create-storage" name:"mysql" help:"Create a new MySQL instance."`
	MySQLDatabase       mysqlDatabaseCmd     `cmd:"" group:"create-storage" name:"mysqldatabase" help:"Create a new MySQL database."`
	Postgres            postgresCmd          `cmd:"" group:"create-storage" name:"postgres" help:"Create a new PostgreSQL instance."`
	PostgresDatabase    postgresDatabaseCmd  `cmd:"" group:"create-storage" name:"postgresdatabase" help:"Create a new PostgreSQL database."`
	KeyValueStore       keyValueStoreCmd     `cmd:"" group:"create-storage" name:"keyvaluestore" aliases:"kvs" help:"Create a new KeyValueStore instance."`
	OpenSearch          openSearchCmd        `cmd:"" group:"create-storage" name:"opensearch" aliases:"os" help:"Create a new OpenSearch cluster."`
	CloudVirtualMachine cloudVMCmd           `cmd:"" group:"create-infra" name:"cloudvirtualmachine" aliases:"cloudvm" help:"Create a new CloudVM."`
	ServiceConnection   serviceConnectionCmd `cmd:"" group:"create-network" name:"serviceconnection" aliases:"sc" help:"Create a new ServiceConnection."`
	StaticEgress        staticEgressCmd      `cmd:"" group:"create-network" name:"staticegress" aliases:"se" help:"Create a new StaticEgress."`
	Bucket              bucketCmd            `cmd:"" group:"create-storage" name:"bucket" help:"Create a new Bucket."`
	BucketUser          bucketUserCmd        `cmd:"" group:"create-storage" name:"bucketuser" aliases:"bu" help:"Create a new BucketUser."`
	Grafana             grafanaCmd           `cmd:"" group:"create-observability" name:"grafana" help:"Create a new Grafana instance."`
}

type DatabaseSSHKeysFlags

type DatabaseSSHKeysFlags struct {
	sshkey.SSHKeysFlags

	// Deprecated Flags
	SSHKeysFile *os.File `hidden:"" completion-predictor:"local:file" help:"Deprecated, use --ssh-keys-from-files instead."`
}

DatabaseSSHKeysFlags declares the SSH public key flags of the database create commands, including the deprecated --ssh-keys-file which the repeatable --ssh-keys-from-files replaces.

func (DatabaseSSHKeysFlags) StorageKeys

func (f DatabaseSSHKeysFlags) StorageKeys(w *format.Writer) ([]storage.SSHKey, error)

StorageKeys returns the validated SSH public keys of all three flags, in the order --ssh-keys, --ssh-keys-from-files and --ssh-keys-file.

type ResourceCmd

type ResourceCmd struct {
	format.Writer `kong:"-"`
	Name          string        `arg:"" help:"Name of the new resource. A random name is generated if omitted." default:""`
	Wait          bool          `default:"true" help:"Wait until resource is fully created."`
	WaitTimeout   time.Duration `default:"30m" help:"Duration to wait for resource getting ready. Only relevant if wait is set."`
}

ResourceCmd is the shared base for the create sub-commands.

It has to be exported so that Kong initializes the embedded format.Writer, see format.Writer.BeforeApply.

func (*ResourceCmd) BeforeApply

func (cmd *ResourceCmd) BeforeApply(streams format.IOStreams) error

BeforeApply initializes Writer from the bound format.IOStreams.

Jump to

Keyboard shortcuts

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