config

package
v0.0.0-...-ce22054 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Locally            bool
	ConfigFile         string
	StartServer        bool   `koanf:"startServer"`
	ExportMetrics      bool   `koanf:"exportMetrics"`
	JSONLoggingEnabled bool   `koanf:"jsonLoggingEnabled"`
	LogFile            string `koanf:"logFile"`
	Verbose            bool   `koanf:"verbose"`
	Debug              bool   `koanf:"debug"`
	Vulnerabilities    bool
}

AppConfig is the config for the app which can be set trough cli and config

type Config

type Config struct {
	CliFlags                AppConfig
	AppConfig               AppConfig                  `koanf:"app"`
	KubernetesFetchEnabled  bool                       `koanf:"kubernetesFetchEnabled"`
	Namespaces              []string                   `koanf:"namespaces"`
	ImageRegistries         registries.ImageRegistries `koanf:"imageRegistries"`
	Xray                    xray.Config                `koanf:"xray"`
	Trivy                   trivy.Config               `koanf:"trivy"`
	GitHub                  github.Repos               `koanf:"github"`
	Images                  []string                   `koanf:"images"`
	HelmRegistries          registries.HelmRegistries  `koanf:"helmRegistries"`
	VulnerabilityFilterData vulnerabilities.FilterData `koanf:"filterVulnerabilities"`
}

Config of the lcm application, normally loaded from the config file

func LoadConfiguration

func LoadConfiguration(configFile string) Config

LoadConfiguration loads the configuration from file

func (Config) IsDebugLoggingEnabled

func (c Config) IsDebugLoggingEnabled() bool

IsDebugLoggingEnabled returns true when debug logging is enabled

func (Config) IsJSONLoggingEnabled

func (c Config) IsJSONLoggingEnabled() bool

IsJSONLoggingEnabled returns true when json logging is enabled

func (Config) IsKubernetesFetchEnabled

func (c Config) IsKubernetesFetchEnabled() bool

IsKubernetesFetchEnabled returns true when Kubernetes fetch is enabled

func (Config) IsVerboseLoggingEnabled

func (c Config) IsVerboseLoggingEnabled() bool

IsVerboseLoggingEnabled returns true when verbose logging is enabled

func (Config) LogToFilePath

func (c Config) LogToFilePath() (bool, string)

LogToFilePath returns true and the log file path when log file is provided

func (Config) PrettyPrintAllowed

func (c Config) PrettyPrintAllowed() bool

PrettyPrintAllowed returns true when pretty print is allowed

func (Config) RunningLocally

func (c Config) RunningLocally() bool

RunningLocally returns true when running locally instead of in Kubernetes

Jump to

Keyboard shortcuts

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