config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldInclude added in v0.1.26

func ShouldInclude(name string, includeREs []Expression, excludeREs []Expression) bool

ShouldInclude - Checks if a resource's name should be included according to the inclusion and exclusion rules

Types

type Config

type Config struct {
	S3                    ResourceType `yaml:"s3"`
	IAMUsers              ResourceType `yaml:"IAMUsers"`
	SecretsManagerSecrets ResourceType `yaml:"SecretsManager"`
	NatGateway            ResourceType `yaml:"NatGateway"`
	AccessAnalyzer        ResourceType `yaml:"AccessAnalyzer"`
	CloudWatchDashboard   ResourceType `yaml:"CloudWatchDashboard"`
	OpenSearchDomain      ResourceType `yaml:"OpenSearchDomain"`
}

Config - the config object we pass around

func GetConfig

func GetConfig(filePath string) (*Config, error)

GetConfig - Unmarshall the config file and parse it into a config object.

type Expression added in v0.1.26

type Expression struct {
	RE regexp.Regexp
}

func (*Expression) UnmarshalText added in v0.1.26

func (expression *Expression) UnmarshalText(data []byte) error

UnmarshalText - Internally used by yaml.Unmarshal to unmarshall an Expression field

type FilterRule

type FilterRule struct {
	NamesRegExp []Expression `yaml:"names_regex"`
}

type ResourceType

type ResourceType struct {
	IncludeRule FilterRule `yaml:"include"`
	ExcludeRule FilterRule `yaml:"exclude"`
}

Jump to

Keyboard shortcuts

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