Documentation
¶
Overview ¶
Package envconf stores configuration for a test environment
Index ¶
- func RandomName(prefix string, n int) string
- type Config
- func (c *Config) AssessmentRegex() *regexp.Regexp
- func (c *Config) AutoCreateNamespace() *Config
- func (c *Config) Client() klient.Client
- func (c *Config) FeatureRegex() *regexp.Regexp
- func (c *Config) Labels() map[string]string
- func (c *Config) Namespace() string
- func (c *Config) NamespaceShouldBeCreated() bool
- func (c *Config) WithAssessmentRegex(regex string) *Config
- func (c *Config) WithClient(client klient.Client) *Config
- func (c *Config) WithFeatureRegex(regex string) *Config
- func (c *Config) WithLabels(lbls map[string]string) *Config
- func (c *Config) WithNamespace(ns string) *Config
- func (c *Config) WithRandomNamespace() *Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomName ¶
RandomName generates a random name of n length with the provided prefix. If prefix is omitted, the then entire name is random char.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents and environment configuration
func NewFromFlags ¶
NewFromFlags initializes an environment config using values from command-line argument flags. See package flags for supported flags.
func NewWithKubeconfig ¶
NewWithKubeconfig is a convenience constructor function that creates a new environment configuration using a kubeconfig file.
func (*Config) AssessmentRegex ¶
AssessmentRegex returns the environment assessment filter
func (*Config) AutoCreateNamespace ¶
AutoCreateNamespace signals that a namespace should be automatically created for the environment
func (*Config) FeatureRegex ¶
FeatureRegex returns the environment's feature regex filter
func (*Config) NamespaceShouldBeCreated ¶
NamespaceShouldBeCreated indicates if a namespace should be created for the environment
func (*Config) WithAssessmentRegex ¶
WithAssessmentRegex sets the environment assessment regex filter
func (*Config) WithClient ¶
WithClient used to update the environment klient.Client
func (*Config) WithFeatureRegex ¶
WithFeatureRegex sets the environment's feature regex filter
func (*Config) WithLabels ¶
WithLabels sets the environment label filters
func (*Config) WithNamespace ¶
WithNamespace updates the environment namespace value
func (*Config) WithRandomNamespace ¶
WithRandomNamespace sets the environment's namespace to a random value