Back to godoc.org

Package config

v0.12.0
Latest Go to latest

The latest major version is .

Published: Oct 13, 2020 | License: Apache-2.0 | Module: github.com/aquasecurity/trivy

Index

type ArtifactConfig

type ArtifactConfig struct {
	Input      string
	Timeout    time.Duration
	ClearCache bool

	SkipDirectories []string

	SkipFiles []string

	// this field is populated in Init()
	Target string
	// contains filtered or unexported fields
}

func NewArtifactConfig

func NewArtifactConfig(c *cli.Context) ArtifactConfig

func (*ArtifactConfig) Init

func (c *ArtifactConfig) Init(ctx *cli.Context, logger *zap.SugaredLogger) (err error)

type DBConfig

type DBConfig struct {
	Reset          bool
	DownloadDBOnly bool
	SkipUpdate     bool
	Light          bool
	NoProgress     bool
}

func NewDBConfig

func NewDBConfig(c *cli.Context) DBConfig

func (*DBConfig) Init

func (c *DBConfig) Init() (err error)

type GlobalConfig

type GlobalConfig struct {
	Context *cli.Context
	Logger  *zap.SugaredLogger

	AppVersion string
	Quiet      bool
	Debug      bool
	CacheDir   string
}

func NewGlobalConfig

func NewGlobalConfig(c *cli.Context) (GlobalConfig, error)

type ImageConfig

type ImageConfig struct {
	ScanRemovedPkgs bool
	ListAllPkgs     bool
}

func NewImageConfig

func NewImageConfig(c *cli.Context) ImageConfig

func (*ImageConfig) Init

func (c *ImageConfig) Init(args cli.Args, logger *zap.SugaredLogger) (err error)

type ReportConfig

type ReportConfig struct {
	Format   string
	Template string

	IgnoreFile    string
	IgnoreUnfixed bool
	ExitCode      int
	IgnorePolicy  string

	// these variables are populated by Init()
	VulnType   []string
	Output     *os.File
	Severities []dbTypes.Severity
	// contains filtered or unexported fields
}

func NewReportConfig

func NewReportConfig(c *cli.Context) ReportConfig

func (*ReportConfig) Init

func (c *ReportConfig) Init(logger *zap.SugaredLogger) (err error)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier