config

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	ConfigPath        string           `yaml:",omitempty"`                   // the location where the application config was read from (either from -c or discovered while loading)
	PresenterOpt      presenter.Option `yaml:"-"`                            // -o, the native Presenter.Option to use for report formatting
	Output            string           `yaml:"output" mapstructure:"output"` // -o, the Presenter hint string to use for report formatting
	ScopeOpt          source.Scope     `yaml:"-"`                            // -s, the native source.Scope option to use for how to catalog the container image
	Scope             string           `yaml:"scope" mapstructure:"scope"`   // -s, the source.Scope string hint for how to catalog the container image
	Quiet             bool             `yaml:"quiet" mapstructure:"quiet"`   // -q, indicates to not show any status output to stderr (ETUI or logging UI)
	Log               logging          `yaml:"log"  mapstructure:"log"`      // all logging-related options
	CliOptions        CliOnlyOptions   `yaml:"-"`                            // all options only available through the CLI (not via env vars or config)
	Dev               Development      `mapstructure:"dev"`
	CheckForAppUpdate bool             `yaml:"check-for-app-update" mapstructure:"check-for-app-update"` // whether to check for an application update on start up or not
	Anchore           anchore          `yaml:"anchore" mapstructure:"anchore"`                           // options for interacting with Anchore Engine/Enterprise
}

Application is the main syft application configuration.

func LoadApplicationConfig added in v0.10.0

func LoadApplicationConfig(v *viper.Viper, cliOpts CliOnlyOptions, wasHostnameSet bool) (*Application, error)

LoadApplicationConfig populates the given viper object with application configuration discovered on disk

func (Application) String added in v0.10.0

func (cfg Application) String() string

type CliOnlyOptions

type CliOnlyOptions struct {
	ConfigPath string // -c. where the read config is on disk
	Verbosity  int    // -v or -vv , controlling which UI (ETUI vs logging) and what the log level should be
}

CliOnlyOptions are options that are in the application config in memory, but are only exposed via CLI switches (not from unmarshaling a config file)

type Development added in v0.11.0

type Development struct {
	ProfileCPU bool `mapstructure:"profile-cpu"`
	ProfileMem bool `mapstructure:"profile-mem"`
}

Jump to

Keyboard shortcuts

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