artifact

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact interface {
	Inspect(ctx context.Context) (reference Reference, err error)
	Clean(reference Reference) error
}

type ArtifactCleanArgs

type ArtifactCleanArgs struct {
	Reference         Reference
	ReferenceAnything bool
}

type ArtifactCleanExpectation

type ArtifactCleanExpectation struct {
	Args    ArtifactCleanArgs
	Returns ArtifactCleanReturns
}

type ArtifactCleanReturns

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

type ArtifactInspectArgs

type ArtifactInspectArgs struct {
	Ctx         context.Context
	CtxAnything bool
}

type ArtifactInspectExpectation

type ArtifactInspectExpectation struct {
	Args    ArtifactInspectArgs
	Returns ArtifactInspectReturns
}

type ArtifactInspectReturns

type ArtifactInspectReturns struct {
	Reference Reference
	Err       error
}

type ImageMetadata added in v0.52.0

type ImageMetadata struct {
	ID          string   // image ID
	DiffIDs     []string // uncompressed layer IDs
	RepoTags    []string
	RepoDigests []string
	ConfigFile  v1.ConfigFile
}

type MockArtifact

type MockArtifact struct {
	mock.Mock
}

MockArtifact is an autogenerated mock type for the Artifact type

func (*MockArtifact) ApplyCleanExpectation

func (_m *MockArtifact) ApplyCleanExpectation(e ArtifactCleanExpectation)

func (*MockArtifact) ApplyCleanExpectations

func (_m *MockArtifact) ApplyCleanExpectations(expectations []ArtifactCleanExpectation)

func (*MockArtifact) ApplyInspectExpectation

func (_m *MockArtifact) ApplyInspectExpectation(e ArtifactInspectExpectation)

func (*MockArtifact) ApplyInspectExpectations

func (_m *MockArtifact) ApplyInspectExpectations(expectations []ArtifactInspectExpectation)

func (*MockArtifact) Clean

func (_m *MockArtifact) Clean(reference Reference) error

Clean provides a mock function with given fields: reference

func (*MockArtifact) Inspect

func (_m *MockArtifact) Inspect(ctx context.Context) (Reference, error)

Inspect provides a mock function with given fields: ctx

type Option

type Option struct {
	AnalyzerGroup     analyzer.Group // It is empty in OSS
	DisabledAnalyzers []analyzer.Type
	DisabledHandlers  []types.HandlerType
	FilePatterns      []string
	Parallel          int
	NoProgress        bool
	Insecure          bool
	Offline           bool
	AppDirs           []string
	SBOMSources       []string
	RekorURL          string
	AWSRegion         string
	AWSEndpoint       string
	FileChecksum      bool // For SPDX
	DetectionPriority types.DetectionPriority

	// Git repositories
	RepoBranch string
	RepoCommit string
	RepoTag    string

	// For image scanning
	ImageOption types.ImageOptions

	MisconfScannerOption misconf.ScannerOption
	SecretScannerOption  analyzer.SecretScannerOption
	LicenseScannerOption analyzer.LicenseScannerOption

	WalkerOption walker.Option
}

func (*Option) AnalyzerOptions added in v0.48.0

func (o *Option) AnalyzerOptions() analyzer.AnalyzerOptions

func (*Option) ConfigAnalyzerOptions added in v0.48.0

func (o *Option) ConfigAnalyzerOptions() analyzer.ConfigAnalyzerOptions

func (*Option) Sort

func (o *Option) Sort()

type Reference added in v0.52.0

type Reference struct {
	Name          string // image name, tar file name, directory or repository name
	Type          Type
	ID            string
	BlobIDs       []string
	ImageMetadata ImageMetadata

	// SBOM
	BOM *core.BOM
}

Reference represents a reference of container image, local filesystem and repository

type Type added in v0.52.0

type Type string

Type represents a type of artifact

const (
	TypeContainerImage Type = "container_image"
	TypeFilesystem     Type = "filesystem"
	TypeRepository     Type = "repository"
	TypeCycloneDX      Type = "cyclonedx"
	TypeSPDX           Type = "spdx"
	TypeAWSAccount     Type = "aws_account"
	TypeVM             Type = "vm"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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