core

package
v0.0.0-...-46fbbb1 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	// DataTypeVulnerability defines a kind for vulnerability.
	DataTypeVulnerability = "vulnerability"
	// DataVersionVulnerability defines version of the vulnerability data scheme.
	DataVersionVulnerability = "v1.1"
	// DataSchemeVulnerability defines the data scheme used for storing and parsing.
	DataSchemeVulnerability = "application/vnd.security.vulnerability.report; version=1.1"
)

Variables

View Source
var (
	// ErrorArtifactNotFound represents whether error not found.
	ErrorArtifactNotFound = errors.New("artifact not found")
)

Functions

func IsArtifactNotFoundError

func IsArtifactNotFoundError(err error) bool

IsArtifactNotFoundError checks error whether artifact not found.

Types

type ArtifactID

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

ArtifactID is used to identify the artifact. Use imageID format in the container status. E.g: ghcr.io/goharbor/harbor-core@sha256:45dad4ee4e982ed42ec29b678321cde66dc30542612044b672082bf1d5a28d7e

func ParseArtifactIDFrom

func ParseArtifactIDFrom(image, imageID string) ArtifactID

ParseArtifactIDFrom parse artifact ID from the image and imageID fields of the pod container.

func (ArtifactID) Digest

func (a ArtifactID) Digest() string

Digest of the artifact.

func (ArtifactID) Namespace

func (a ArtifactID) Namespace() string

Namespace or project of the artifact.

func (ArtifactID) Registry

func (a ArtifactID) Registry() string

Registry of the artifact.

func (ArtifactID) Repository

func (a ArtifactID) Repository() string

Repository of the artifact.

func (ArtifactID) String

func (a ArtifactID) String() string

String value of the ArtifactID.

func (ArtifactID) Tag

func (a ArtifactID) Tag() string

Tag of the artifact.

type Metadata

type Metadata struct {
	// Kind of the data.
	Kind string
	// Version of the data scheme.
	Version string
	// Data scheme used.
	Scheme string
}

Metadata of the security data.

func (Metadata) Equal

func (m Metadata) Equal(another Metadata) bool

Equal checks if the two metadata are totally same.

func (Metadata) String

func (m Metadata) String() string

String value of the metadata that can be used as a UUID.

Jump to

Keyboard shortcuts

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