Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountConfig ¶
type AccountConfig struct { Name string `yaml:"name"` ID int64 `yaml:"id"` Role string `yaml:"role"` Owner string `yaml:"owner"` }
AccountConfig identifies an AWS account we want to monitor
type Config ¶
type Config struct { Version int `yaml:version` Policies []PolicyConfig `yaml:"policies"` AWSRegions []string `yaml:"aws_regions"` Accounts []AccountConfig `yaml:"accounts"` IdentityMap []IdentityMapConfig `yaml:"identity_map"` }
Config is the configuration
func (*Config) GetAccounts ¶
GetAccounts will return policy.Account objects
func (*Config) GetIdentityMap ¶
GetIdentityMap will return a map of email -> slack identifier
type Duration ¶
Duration because I really love writing time un/marshal logic
func (*Duration) Duration ¶
Duration returns our custom type as a time.Duration handling nils when needed
func (*Duration) UnmarshalYAML ¶
UnmarshalYAML custom unmarshal logic
type IdentityMapConfig ¶
IdentityMapConfig will allow mapping group email lists to slack channels
type NotificationConfig ¶
type NotificationConfig struct { Recipient string `yaml:"recipient"` MessageTemplate string `yaml:"message_template"` }
NotificationConfig is a notification config
type NotificationsConfig ¶
type NotificationsConfig struct {
Warnings []NotificationConfig `yaml:"warnings"`
}
type PolicyConfig ¶
type PolicyConfig struct { Name string `yaml:"name"` ResourceSelector string `yaml:"resource_selector"` TagSelector *string `yaml:"tag_selector"` LabelSelector *string `yaml:"label_selector"` // MaxAge for this resource // If it matches the policy and exceeds MaxAge remediation will be taken. MaxAge *Duration `yaml:"max_age"` Notifications NotificationsConfig `yaml:"notifications"` }
PolicyConfig is the configuration for a policy
Click to show internal directories.
Click to hide internal directories.