Documentation ¶
Index ¶
- type AppConfig
- type Config
- func (c Config) IsDebugLoggingEnabled() bool
- func (c Config) IsJSONLoggingEnabled() bool
- func (c Config) IsKubernetesFetchEnabled() bool
- func (c Config) IsVerboseLoggingEnabled() bool
- func (c Config) LogToFilePath() (bool, string)
- func (c Config) PrettyPrintAllowed() bool
- func (c Config) RunningLocally() bool
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 ¶
LoadConfiguration loads the configuration from file
func (Config) IsDebugLoggingEnabled ¶
IsDebugLoggingEnabled returns true when debug logging is enabled
func (Config) IsJSONLoggingEnabled ¶
IsJSONLoggingEnabled returns true when json logging is enabled
func (Config) IsKubernetesFetchEnabled ¶
IsKubernetesFetchEnabled returns true when Kubernetes fetch is enabled
func (Config) IsVerboseLoggingEnabled ¶
IsVerboseLoggingEnabled returns true when verbose logging is enabled
func (Config) LogToFilePath ¶
LogToFilePath returns true and the log file path when log file is provided
func (Config) PrettyPrintAllowed ¶
PrettyPrintAllowed returns true when pretty print is allowed
func (Config) RunningLocally ¶
RunningLocally returns true when running locally instead of in Kubernetes