oneoff

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildScript

func BuildScript(p OneOffScriptParams) (string, error)

BuildScript creates a Bash script that: - downloads and extracts teleport binary - runs `teleport ` with the args defined in the query param

Types

type OneOffScriptParams

type OneOffScriptParams struct {
	// TeleportArgs is the arguments to pass to the teleport binary.
	// Eg, 'version'
	TeleportArgs string

	// BinUname is the binary used to get OS name and Architecture of the host.
	// Defaults to `uname`.
	BinUname string
	// BinUname is the binary used to create a temporary directory, used to download the files.
	// Defaults to `mktemp`.
	BinMktemp string
	// CDNBaseURL is the URL used to download the teleport tarball.
	// Defaults to `https://cdn.teleport.dev`
	CDNBaseURL string
	// TeleportVersion is the teleport version to download.
	// Defaults to v<currentTeleportVersion>
	// Eg, v13.1.0
	TeleportVersion string

	// TeleportFlavor is the teleport flavor to download.
	// Only OSS or Enterprise versions are allowed.
	// Possible values:
	// - teleport
	// - teleport-ent
	TeleportFlavor string

	// SuccessMessage is a message shown to the user after the one off is completed.
	SuccessMessage string
}

OneOffScriptParams contains the required params to create a script that downloads and executes teleport binary.

func (*OneOffScriptParams) CheckAndSetDefaults

func (p *OneOffScriptParams) CheckAndSetDefaults() error

CheckAndSetDefaults checks if the required params ara present.

Jump to

Keyboard shortcuts

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