config

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Slack struct {
		Token        string `yaml:"token" env:"SLACK_TOKEN"`
		SecurityUser string `yaml:"security_user" emv:"SLACK_SECURITY_USER"`

		SkipNoReport  bool `yaml:"skip_no_report" env:"SLACK_SKIP_NO_REPORT"`
		SkipOnHoliday bool `yaml:"skip_on_holiday" env:"SLACK_SKIP_ON_HOLIDAY"`
	} `yaml:"slack"`

	Falcon struct {
		ClientID    string `yaml:"clientid" env:"FALCON_CLIENT_ID"`
		Secret      string `yaml:"secret" env:"FALCON_SECRET"`
		CloudRegion string `yaml:"cloud_region" env:"FALCON_CLOUD_REGION"`

		SkipNoMitigation bool     `yaml:"skip_no_mitigation" env:"FALCON_SKIP_NO_MITIGATION"`
		SkipSeverities   []string `yaml:"skip_severities" env:"FALCON_SKIP_SEVERITIES"`
		MinCVEBaseScore  int      `yaml:"min_cve_base_score" env:"FALCON_MIN_CVE_BASE_SCORE"`
	} `yaml:"falcon"`

	WS1 struct {
		Endpoint string `yaml:"api_url" env:"WS1_API_URL"`
		APIKey   string `yaml:"api_key" env:"WS1_API_KEY"`
		User     string `yaml:"user" env:"WS1_USER"`
		Password string `yaml:"password" env:"WS1_PASSWORD"`

		SkipFilters []struct {
			Policy string `yaml:"policy"`
			User   string `yaml:"user"`
		} `yaml:"skip"`
	} `yaml:"ws1"`

	Email struct {
		Domains []string `yaml:"domains" env:"DOMAINS"`
	} `yaml:"email"`

	Templates struct {
		UserMessage             string `yaml:"user_message" env:"USER_MESSAGE"`
		SecurityOverviewMessage string `yaml:"security_overview_message" env:"SECURITY_OVERVIEW_MESSAGE"`
	} `yaml:"templates"`
}

func LoadConfig

func LoadConfig(logger *logrus.Logger, path string) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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