config

package
v0.0.0-...-99ac84a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AWSProviderName = "aws"

AWSProviderName AWS provider name.

View Source
const RecommendedConfigFileName = "config"

RecommendedConfigFileName Recommended Configuration File Name.

Variables

View Source
var ErrEmptyAWSConfiguration = errors.New("aws configuration is empty")

ErrEmptyAWSConfiguration Error Empty AWS Configuration.

View Source
var ErrEmptyAWSRegionConfiguration = errors.New("aws region is empty in configuration")

ErrEmptyAWSRegionConfiguration Error Empty AWS Region Configuration.

View Source
var ErrNoProviderSelected = errors.New("no provider selected")

ErrNoProviderSelected No provider selected error.

View Source
var ErrProviderNotSupported = errors.New("provider not supported")

ErrProviderNotSupported Provider not supported error.

View Source
var SupportedProviders = []string{AWSProviderName}

SupportedProviders List of supported providers.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	Region string `mapstructure:"region"`
}

AWSConfig AWS Configuration.

type ConditionConfig

type ConditionConfig struct {
	Condition string `mapstructure:"condition"`
	Value     string `mapstructure:"value"`
	Operator  string `mapstructure:"operator"`
}

ConditionConfig Condition Configuration.

type Configuration

type Configuration struct {
	Namespace  string        `mapstructure:"namespace"`
	Kubeconfig string        `mapstructure:"kubeconfig"`
	Address    string        `mapstructure:"address"`
	LogLevel   string        `mapstructure:"loglevel"`
	LogFormat  string        `mapstructure:"logformat"`
	AWS        *AWSConfig    `mapstructure:"aws"`
	Rules      []*RuleConfig `mapstructure:"rules"`
	Provider   string        `mapstructure:"provider"`
}

Configuration configuration.

func (*Configuration) IsValid

func (cfg *Configuration) IsValid() error

IsValid Checks if the configuration is valid.

type RuleConfig

type RuleConfig struct {
	Tag    string             `mapstructure:"tag"`
	Query  string             `mapstructure:"query"`
	Value  string             `mapstructure:"value"`
	Action string             `mapstructure:"action"`
	When   []*ConditionConfig `mapstructure:"when"`
}

RuleConfig Rule Configuration.

Jump to

Keyboard shortcuts

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