docker

package
v0.0.0-...-4673371 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: EUPL-1.2 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultIgnoreFileNames

func GetDefaultIgnoreFileNames() []string

Types

type DockerScan

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

func NewScanner

func NewScanner(ctx context.Context, fileScanner FileScanner, imageName string, opts ...Option) (*DockerScan, error)

func (*DockerScan) FindLayers

func (scanner *DockerScan) FindLayers(ctx context.Context) ([]v1.Layer, error)

func (*DockerScan) ProcessLayers

func (scanner *DockerScan) ProcessLayers(ctx context.Context, layers []v1.Layer) error

func (*DockerScan) ScannedLayers

func (scanner *DockerScan) ScannedLayers() []string

type FileScanner

type FileScanner interface {
	ExtractFromReader(ctx context.Context, fileName string, reader io.Reader) ([]file.ExtractResult, error)
}

type LayerResult

type LayerResult struct {
	Layer    string
	FileName string
	Results  []file.ExtractResult
}

type Option

type Option func(*options) error

func WithCallbackResult

func WithCallbackResult(f func(scanner *DockerScan, result *LayerResult) error) Option

func WithCredentials

func WithCredentials(creds authn.Authenticator) Option

func WithIgnoreFileNames

func WithIgnoreFileNames(useDefault bool, names ...string) Option

func WithProbability

func WithProbability(probability float64) Option

Jump to

Keyboard shortcuts

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