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 SkipDirs []string SkipFiles []string // this field is populated in Init() Target string }
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 ¶
type CacheConfig struct {
CacheBackend string
}
CacheConfig holds the config for cache
func NewCacheConfig ¶
func NewCacheConfig(c *cli.Context) CacheConfig
NewCacheConfig returns an instance of CacheConfig
type DBConfig ¶
DBConfig holds the config for trivy DB
func NewDBConfig ¶
func NewDBConfig(c *cli.Context) DBConfig
NewDBConfig is the factory method to return 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 ¶
ImageConfig holds the config for scanning images
func NewImageConfig ¶
func NewImageConfig(c *cli.Context) ImageConfig
NewImageConfig is the factory method to return 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