cliconfig

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentsKey       = "environments"
	DefaultEnvironmentKey = "default_environment"
	NameKey               = "name"
	OperatorEndpointKey   = "operator_endpoint"
)
View Source
const (
	ErrEnvironmentNotConfigured     = "cliconfig.environment_not_configured"
	ErrEnvironmentAlreadyConfigured = "cliconfig.environment_already_configured"
	ErrDuplicateEnvironmentNames    = "cliconfig.duplicate_environment_names"
)

Variables

This section is empty.

Functions

func CortexEndpointValidator added in v0.30.0

func CortexEndpointValidator(val string) (string, error)

func ErrorDuplicateEnvironmentNames

func ErrorDuplicateEnvironmentNames(envName string) error

func ErrorEnvironmentAlreadyConfigured added in v0.35.0

func ErrorEnvironmentAlreadyConfigured(envName string) error

func ErrorEnvironmentNotConfigured

func ErrorEnvironmentNotConfigured(envName string) error

Types

type CLIConfig

type CLIConfig struct {
	Telemetry          *bool          `json:"telemetry,omitempty" yaml:"telemetry,omitempty"`
	DefaultEnvironment *string        `json:"default_environment" yaml:"default_environment"`
	Environments       []*Environment `json:"environments" yaml:"environments"`
}

func (*CLIConfig) ConvertToUserFacingCLIConfig added in v0.31.0

func (cliConfig *CLIConfig) ConvertToUserFacingCLIConfig() UserFacingCLIConfig

func (*CLIConfig) Validate

func (cliConfig *CLIConfig) Validate() error

type Environment

type Environment struct {
	Name             string `json:"name" yaml:"name"`
	OperatorEndpoint string `json:"operator_endpoint" yaml:"operator_endpoint"`
}

func (Environment) String

func (env Environment) String(isDefault bool) string

func (*Environment) Validate

func (env *Environment) Validate() error

type UserFacingCLIConfig added in v0.31.0

type UserFacingCLIConfig struct {
	DefaultEnvironment *string        `json:"default_environment" yaml:"default_environment"`
	Environments       []*Environment `json:"environments" yaml:"environments"`
}

Jump to

Keyboard shortcuts

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