inventory

package
v1.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	Timestamp             string        `json:"timestamp,omitempty"` // Should be generated using time.Now.UTC() and formatted according to RFC Y-M-DTH:M:SZ
	Results               []ReportItem  `json:"results"`
	ServerVersionMetadata *version.Info `json:"serverVersionMetadata"`
	ClusterName           string        `json:"cluster_name"`
	InventoryType         string        `json:"inventory_type"`
}

type ReportImage

type ReportImage struct {
	Tag        string `json:"tag,omitempty"`
	RepoDigest string `json:"repoDigest,omitempty"`
}

ReportImage represents a unique image in a cluster

type ReportItem

type ReportItem struct {
	Namespace string        `json:"namespace,omitempty"`
	Images    []ReportImage `json:"images"`
}

ReportItem represents a namespace and all it's unique images

func NewReportItem

func NewReportItem(
	pods []v1.Pod,
	namespace string,
	ignoreNotRunning bool,
	missingTagPolicy string,
	dummyTag string,
) ReportItem

NewReportItem parses a list of pods into a ReportItem full of unique images

func (*ReportItem) String

func (r *ReportItem) String() string

String represent the ReportItem as a string

Jump to

Keyboard shortcuts

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