config

package
v0.0.0-...-318a3d5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeptnDefaultConfigPath

func GetKeptnDefaultConfigPath() (string, error)

GetKeptnDefaultConfigPath returns default Keptn Config file path

func GetKeptnDirectory

func GetKeptnDirectory() (string, error)

GetKeptnDirectory returns a path, which is used to store logs and possibly creds

Types

type CLIConfig

type CLIConfig struct {
	AutomaticVersionCheck bool       `json:"automatic_version_check" mapstructure:"automatic_version_check"`
	KubeContextCheck      bool       `json:"kube_context_check" mapstructure:"kube_context_check"`
	LastVersionCheck      *time.Time `json:"last_version_check" mapstructure:"last_version_check"`
	CurrentContext        string     `json:"current-context" mapstructure:"current-context"`
}

CLIConfig holds infos of the CLI config

type CLIConfigManager

type CLIConfigManager struct {
	CLIConfigPath string
	// contains filtered or unexported fields
}

CLIConfigManager manages the path of the CLI config

func NewCLIConfigManager

func NewCLIConfigManager(cfgFile string) *CLIConfigManager

NewCLIConfigManager creates a new CLIConfigManager

func (*CLIConfigManager) GetCLIConfig

func (c *CLIConfigManager) GetCLIConfig() (CLIConfig, error)

GetCLIConfig gets the already loaded configuration

func (*CLIConfigManager) GetConfigDirectoryPath

func (c *CLIConfigManager) GetConfigDirectoryPath() string

func (*CLIConfigManager) LoadCLIConfig

func (c *CLIConfigManager) LoadCLIConfig() (CLIConfig, error)

LoadCLIConfig loads the configuration from file

func (*CLIConfigManager) StoreCLIConfig

func (c *CLIConfigManager) StoreCLIConfig(config CLIConfig) error

StoreCLIConfig stores the configuration into the file

Jump to

Keyboard shortcuts

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