common

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputType

type InputType string
const (
	SBOM          InputType = "sbom"
	IMAGE         InputType = "image"
	DOCKERARCHIVE InputType = "docker-archive"
	OCIARCHIVE    InputType = "oci-archive"
	OCIDIR        InputType = "oci-dir"
	DIR           InputType = "dir"
	ROOTFS        InputType = "rootfs"
	FILE          InputType = "file"
	CSV           InputType = "csv"
)

func (InputType) GetSource

func (s InputType) GetSource(localImage bool) string

func (InputType) IsOnFilesystem

func (s InputType) IsOnFilesystem() bool

IsOnFilesystem returns true if the InputType can be found on the filesystem.

func (InputType) IsOneOf

func (s InputType) IsOneOf(types ...InputType) bool

IsOneOf returns true if one of provided input types matches the actual type.

type Registry

type Registry struct {
	SkipVerifyTLS bool           `yaml:"skip-verify-tls" json:"skip-verify-tls" mapstructure:"skip-verify-tls"`
	UseHTTP       bool           `yaml:"use-http" json:"use-http" mapstructure:"use-http"`
	Auths         []RegistryAuth `yaml:"auths" json:"auths" mapstructure:"auths"`
}

type RegistryAuth

type RegistryAuth struct {
	Authority string `yaml:"authority" json:"authority" mapstructure:"authority"`
	Username  string `yaml:"-" json:"-" mapstructure:"username"`
	Password  string `yaml:"-" json:"-" mapstructure:"password"`
	Token     string `yaml:"-" json:"-" mapstructure:"token"`
}

type ScanInfo

type ScanInfo struct {
	ScannerName string    `json:"scanner_name" yaml:"scanner_name" mapstructure:"scanner_name"`
	InputType   InputType `json:"input_type" yaml:"input_type" mapstructure:"input_type"`
	InputPath   string    `json:"input_path" yaml:"input_path" mapstructure:"input_path"`
	InputSize   int64     `json:"input_size" yaml:"input_size" mapstructure:"input_size"`
	StartTime   time.Time `json:"start_time" yaml:"start_time" mapstructure:"start_time"`
	EndTime     time.Time `json:"end_time" yaml:"end_time" mapstructure:"end_time"`
}

ScanInfo defines basic metadata for a successfully processed ScanInput.

func (ScanInfo) String

func (m ScanInfo) String() string

type ScanInput

type ScanInput struct {
	// StripPathFromResult overrides global StripInputPaths value
	StripPathFromResult *bool     `json:"strip_path_from_result" yaml:"strip_path_from_result" mapstructure:"strip_path_from_result"`
	Input               string    `json:"input" yaml:"input" mapstructure:"input"`
	InputType           InputType `json:"input_type" yaml:"input_type" mapstructure:"input_type"`
}

func (ScanInput) String

func (s ScanInput) String() string

Jump to

Keyboard shortcuts

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