image

package
v0.0.0-...-abb798d Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// I_registry of the image
	I_registry string
	// I_repository of the image (=name)
	I_repository string
	// I_tag of the image
	I_tag string
	// wheather the image is a usual image or a general I_oci artifact
	I_oci bool
	// I_cfg is the config
	I_cfg       *config.Config
	I_vulncheck *Vulncheck
}

func NewImage

func NewImage(cfg *config.Config, registry, repository, tag string) *Image

func NewOCIImage

func NewOCIImage(cfg *config.Config, registry, repository, tag string) *Image

func (*Image) Digest

func (i *Image) Digest() (string, error)

func (*Image) IsOCI

func (i *Image) IsOCI() bool

func (*Image) Manifest

func (i *Image) Manifest() (string, error)

func (*Image) MustDigest

func (i *Image) MustDigest() string

func (*Image) Registry

func (i *Image) Registry() string

func (*Image) RegistryPlain

func (i *Image) RegistryPlain() string

func (*Image) RegistryRepository

func (i *Image) RegistryRepository() string

func (*Image) RegistryRepositoryPlain

func (i *Image) RegistryRepositoryPlain() string

func (*Image) RegistryRepositoryTag

func (i *Image) RegistryRepositoryTag() string

func (*Image) RegistryRepositoryTagDigest

func (i *Image) RegistryRepositoryTagDigest() string

func (*Image) RegistryRepositoryTagDigestPlain

func (i *Image) RegistryRepositoryTagDigestPlain() string

func (*Image) RegistryRepositoryTagPlain

func (i *Image) RegistryRepositoryTagPlain() string

func (*Image) Repository

func (i *Image) Repository() string

func (*Image) Safe

func (i *Image) Safe() bool

func (*Image) SetVulncheck

func (i *Image) SetVulncheck(vulncheck *Vulncheck)

func (*Image) String

func (i *Image) String() string

func (*Image) StringPlain

func (i *Image) StringPlain() string

func (*Image) Tag

func (i *Image) Tag() string

func (*Image) TagPlain

func (i *Image) TagPlain() string

func (*Image) ToPersistance

func (i *Image) ToPersistance(name string) (*ImagePersistance, error)

type ImagePersistance

type ImagePersistance struct {
	Name       string     `yaml:"name"`
	Registry   string     `yaml:"registry"`
	Repository string     `yaml:"repository"`
	Tag        string     `yaml:"tag"`
	OCI        bool       `yaml:"oci"`
	Digest     string     `yaml:"digest"`
	Vulncheck  *Vulncheck `yaml:"vulncheck"`
}

func (*ImagePersistance) ToImage

func (i *ImagePersistance) ToImage() *Image

type Vuln

type Vuln struct {
	CVE      string `yaml:"id"`
	Title    string `yaml:"title"`
	PkgName  string `yaml:"pkgname"`
	Severity string `yaml:"severity"`
}

func NewVuln

func NewVuln(vuln types.DetectedVulnerability) (v *Vuln)

type Vulncheck

type Vulncheck struct {
	LastChecked time.Time `yaml:"lastchecked"`
	Results     []*Vuln   `yaml:"results"`
	Unknown     int       `yaml:"unknown"`
	Low         int       `yaml:"low"`
	Medium      int       `yaml:"medium"`
	High        int       `yaml:"high"`
	Critical    int       `yaml:"critical"`
}

func NewVulncheck

func NewVulncheck(report *types.Report) (vc *Vulncheck)

func (*Vulncheck) Safe

func (v *Vulncheck) Safe() bool

func (*Vulncheck) Total

func (v *Vulncheck) Total() int

Jump to

Keyboard shortcuts

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