cmd

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigNameEnv = "YAKS_CONFIG_NAME"
	ConfigPathEnv = "YAKS_CONFIG_PATH"
)
View Source
const (
	ConfigFile    = "yaks-config.yaml"
	SettingsFile  = "yaks.settings.yaml"
	KubeDockImage = "joyrex2001/kubedock:0.16.0"
	SeleniumImage = "selenium/standalone-chrome:latest"
)
View Source
const (
	CucumberOptions    = "CUCUMBER_OPTIONS"
	CucumberGlue       = "CUCUMBER_GLUE"
	CucumberFeatures   = "CUCUMBER_FEATURES"
	CucumberFilterTags = "CUCUMBER_FILTER_TAGS"
)
View Source
const (
	// DefaultConfigName is the default config name.
	DefaultConfigName = "yaks-config"

	// DefaultConfigLocation is the main place where the yaks content is stored.
	DefaultConfigLocation = DefaultConfigName + ".yaml"

	// YaksTagName ---.
	YaksTagName = "yaks"

	// MapstructureTagName ---.
	MapstructureTagName = "mapstructure"
)

Variables

View Source
var VersionVariant = ""

VersionVariant may be overridden at build time.

Functions

func NewYaksCommand

func NewYaksCommand(ctx context.Context) (*cobra.Command, error)

NewYaksCommand --.

Types

type Config added in v0.1.0

type Config struct {
	// contains filtered or unexported fields
}

Config is a helper class to manipulate yaks configuration files.

func LoadConfiguration added in v0.1.0

func LoadConfiguration() (*Config, error)

LoadConfiguration loads a yaks configuration file.

func (*Config) Delete added in v0.1.0

func (cfg *Config) Delete(path string)

Delete allows to remove a sub tree from the yaks content.

func (*Config) Save added in v0.1.0

func (cfg *Config) Save() error

Save ---.

func (*Config) SetNode added in v0.1.0

func (cfg *Config) SetNode(nodeID string, nodeValues map[string]interface{})

SetNode allows to replace a subtree with a given content.

func (*Config) Update added in v0.1.0

func (cfg *Config) Update(cmd *cobra.Command, nodeID string, data interface{}, changedOnly bool)

Update ---.

type RootCmdOptions

type RootCmdOptions struct {
	RootContext   context.Context    `mapstructure:"-"`
	Context       context.Context    `mapstructure:"-"`
	ContextCancel context.CancelFunc `mapstructure:"-"`

	KubeConfig string `mapstructure:"kube-config"`
	Namespace  string `mapstructure:"namespace"`
	Verbose    bool   `mapstructure:"verbose"`
	Local      bool   `mapstructure:"local"`
	// contains filtered or unexported fields
}

RootCmdOptions --.

func (*RootCmdOptions) GetCmdClient

func (command *RootCmdOptions) GetCmdClient() (client.Client, error)

GetCmdClient returns the client that can be used from command line tools.

func (*RootCmdOptions) NewCmdClient

func (command *RootCmdOptions) NewCmdClient() (client.Client, error)

NewCmdClient returns a new client that can be used from command line tools.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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