dependencies

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package dependencies contains integration towards the dependencies service

Index

Constants

View Source
const MIMEApplicationJOSEJSON = "application/jose+json"

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	ID       string    `json:"ref"`
	Sha      string    `json:"sha,omitempty"`
	Central  bool      `json:"central"`
	LastScan time.Time `json:"last"`
}

type ScanResult

type ScanResult struct {
	Sha             string                               `json:"sha"`
	Vulnerabilities []*sharedscanner.MergedVulnerability `json:"vulnerabilities"`
	BOM             *cdx.BOM                             `json:"sbom"`
	Workload        WorkloadRef                          `json:"workload"`
}

type Service

type Service interface {
	GetImage(ctx context.Context, ref string) (*Image, error)
	PushScan(ctx context.Context, repo string, res *ScanResult) error
}

func New

func New(clusterID, clusterNRN, baseURL, certFile, keyFile string) (Service, error)

type WorkloadRef

type WorkloadRef struct {
	FQDN       string `json:"cluster"`
	NRN        string `json:"nrn"`
	ApiVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Namespace  string `json:"namespace"`
	Name       string `json:"name"`
}

func RefFromKind

func RefFromKind(obj kc.Object) WorkloadRef

Jump to

Keyboard shortcuts

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