app

package
v0.0.0-...-947b840 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppContext

type AppContext interface {
	// WorkingDir returns path of the directory from where
	// the application was executed.
	WorkingDir() string

	// HomeDir returns path of the directory where cluster
	// configuration files and related dependencies are
	// stored.
	//
	// Default is "$HOME/.kubitect".
	HomeDir() string

	// ShareDir returns path of the directory where binaries
	// that are shared among all clusters are stored.
	//
	// Default is "$HOME/.kubitect/share"
	ShareDir() string

	// ClustersDir returns path of the directory where
	// clusters are created.
	//
	// Default is "$HOME/.kubitect/clusters".
	ClustersDir() string

	// LocalClustersDir returns path of the directory where
	// local clusters are created.
	//
	// Default is "./.kubitect/clusters".
	LocalClustersDir() string

	// Local indicates that all cluster actions should be
	// executed within working directory.
	Local() bool

	// ShowTerraformPlan indicates that terraform plan should
	// be always shown.
	ShowTerraformPlan() bool
}

type AppContextMock

type AppContextMock interface {
	AppContext
	Ui() ui.UiMock
	Options() AppContextOptions
}

func MockAppContext

func MockAppContext(t *testing.T, opts ...AppContextOptions) AppContextMock

type AppContextOptions

type AppContextOptions struct {
	// Automatically approve user prompts
	AutoApprove bool

	// Show debug messages
	Debug bool

	// Disable color in output
	NoColor bool

	// Local deployment. Use working dir as project home dir.
	Local bool

	// Show terraform plan
	ShowTerraformPlan bool
	// contains filtered or unexported fields
}

func (AppContextOptions) AppContext

func (o AppContextOptions) AppContext() AppContext

NewAppContext creates new application context and initializes a global UI.

Jump to

Keyboard shortcuts

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