Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrApplicationConfigNotFound = fmt.Errorf("application config not found")
Functions ¶
func PowerUserCatalogerEnabledDefault ¶ added in v0.31.0
func PowerUserCatalogerEnabledDefault()
PowerUserCatalogerEnabledDefault switches all catalogers to be enabled when running power-user command
Types ¶
type Application ¶
type Application struct { ConfigPath string `yaml:",omitempty" json:"configPath"` // the location where the application config was read from (either from -c or discovered while loading) Output []string `yaml:"output" json:"output" mapstructure:"output"` // -o, the format to use for output File string `yaml:"file" json:"file" mapstructure:"file"` // --file, the file to write report output to Quiet bool `yaml:"quiet" json:"quiet" mapstructure:"quiet"` // -q, indicates to not show any status output to stderr (ETUI or logging UI) CheckForAppUpdate bool `yaml:"check-for-app-update" json:"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" json:"anchore" mapstructure:"anchore"` // options for interacting with Anchore Engine/Enterprise CliOptions CliOnlyOptions `yaml:"-" json:"-"` // all options only available through the CLI (not via env vars or config) Dev development `yaml:"dev" json:"dev" mapstructure:"dev"` Log logging `yaml:"log" json:"log" mapstructure:"log"` // all logging-related options Package pkg `yaml:"package" json:"package" mapstructure:"package"` FileMetadata FileMetadata `yaml:"file-metadata" json:"file-metadata" mapstructure:"file-metadata"` FileClassification fileClassification `yaml:"file-classification" json:"file-classification" mapstructure:"file-classification"` FileContents fileContents `yaml:"file-contents" json:"file-contents" mapstructure:"file-contents"` Secrets secrets `yaml:"secrets" json:"secrets" mapstructure:"secrets"` Registry registry `yaml:"registry" json:"registry" mapstructure:"registry"` Exclusions []string `yaml:"exclude" json:"exclude" mapstructure:"exclude"` Attest attest `yaml:"attest" json:"attest" mapstructure:"attest"` }
Application is the main syft application configuration.
func LoadApplicationConfig ¶ added in v0.10.0
func LoadApplicationConfig(v *viper.Viper, cliOpts CliOnlyOptions) (*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 FileMetadata ¶ added in v0.15.0
type FileMetadata struct { Cataloger catalogerOptions `yaml:"cataloger" json:"cataloger" mapstructure:"cataloger"` Digests []string `yaml:"digests" json:"digests" mapstructure:"digests"` }
type RegistryCredentials ¶ added in v0.15.0
type RegistryCredentials struct { Authority string `yaml:"authority" json:"authority" mapstructure:"authority"` // IMPORTANT: do not show the username in any YAML/JSON output (sensitive information) Username string `yaml:"-" json:"-" mapstructure:"username"` // IMPORTANT: do not show the password in any YAML/JSON output (sensitive information) Password string `yaml:"-" json:"-" mapstructure:"password"` // IMPORTANT: do not show the token in any YAML/JSON output (sensitive information) Token string `yaml:"-" json:"-" mapstructure:"token"` }
Click to show internal directories.
Click to hide internal directories.