config

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

ArtifactConfig holds the config for a artifact scanning

func NewArtifactConfig

func NewArtifactConfig(c *cli.Context) ArtifactConfig

NewArtifactConfig is the factory method to return artifact config

func (*ArtifactConfig) Init

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

Init initialize the CLI context for artifact scanning

type CacheConfig added in v0.15.0

type CacheConfig struct {
	CacheBackend string
}

CacheConfig holds the config for cache

func NewCacheConfig added in v0.15.0

func NewCacheConfig(c *cli.Context) CacheConfig

NewCacheConfig returns an instance of CacheConfig

func (*CacheConfig) Init added in v0.15.0

func (c *CacheConfig) Init() error

Init initialize the CacheConfig

type DBConfig

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

DBConfig holds the config for trivy DB

func NewDBConfig

func NewDBConfig(c *cli.Context) DBConfig

NewDBConfig is the factory method to return the DBConfig

func (*DBConfig) Init

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

Init initialize the DBConfig

type GlobalConfig

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

	AppVersion string
	Quiet      bool
	Debug      bool
	CacheDir   string
}

GlobalConfig holds the global config for trivy

func NewGlobalConfig

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

NewGlobalConfig is the factory method to return GlobalConfig

type ImageConfig

type ImageConfig struct {
	ScanRemovedPkgs bool
	ListAllPkgs     bool
}

ImageConfig holds the config for scanning images

func NewImageConfig

func NewImageConfig(c *cli.Context) ImageConfig

NewImageConfig is the factory method to return imageConfig

func (*ImageConfig) Init

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

Init initializes the imageConfig

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
}

ReportConfig holds the config for reporting scan results

func NewReportConfig

func NewReportConfig(c *cli.Context) ReportConfig

NewReportConfig is the factory method to return ReportConfig

func (*ReportConfig) Init

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

Init initializes the ReportConfig

Jump to

Keyboard shortcuts

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