image

package
v0.0.0-...-d4f072a Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageScanner

type ImageScanner struct {
	// contains filtered or unexported fields
}

func NewImageScanner

func NewImageScanner(kclient KubernetesClient, tclient TrivyClient, concurrency uint8) *ImageScanner

func (*ImageScanner) CleanUp

func (i *ImageScanner) CleanUp() error

func (*ImageScanner) Name

func (i *ImageScanner) Name() string

func (*ImageScanner) Scan

func (*ImageScanner) ScanImages

func (i *ImageScanner) ScanImages(ctx context.Context, images []string, cacheDir string, concurrency int64) ([]report.Report, error)

type KubernetesClient

type KubernetesClient interface {
	ListDeployments(ctx context.Context) ([]v1.Deployment, error)
	ListStatefulSets(ctx context.Context) ([]v1.StatefulSet, error)
	ListDaemonSets(ctx context.Context) ([]v1.DaemonSet, error)
	ListCronJobs(ctx context.Context) ([]batchv1.CronJob, error)
}

type TrivyClient

type TrivyClient interface {
	ScanImage(ctx context.Context, image string, cacheDir string) (*report.Report, error)
	UpdateDatabase(ctx context.Context, cacheDir string) error
}

Jump to

Keyboard shortcuts

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