reporter

package
v1.6.2 Latest Latest
Warning

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

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

Documentation

Overview

Once In-Use Image data has been gathered, this package reports the data to Anchore

Index

Constants

View Source
const (
	AnchoreAccountMissingError = "User account not found"
)

Variables

View Source
var (
	ErrAnchoreAccountDoesNotExist = fmt.Errorf("user account not found")
)

Functions

func Normalize added in v1.3.0

func Normalize(report inventory.Report) (inventory.Report, bool)

Only send a report that contains all required references in the report. E.g. if a container references a pod that is not in the report, remove the container from the report and log it. This is likely due to timing issues gathering the inventory but we should not send incomplete data to Anchore. Returns the normalized report and a boolean indicating if the report was modified.

func Post

func Post(report inventory.Report, anchoreDetails config.AnchoreInfo) error

This method does the actual Reporting (via HTTP) to Anchore

Types

type AnchoreResponse added in v1.5.0

type AnchoreResponse struct {
	Message          string      `json:"message"`
	Httpcode         int         `json:"httpcode"`
	Detail           interface{} `json:"detail"`
	AnchoreRequestID string      `json:"anchore_request_id"`
}

type AnchoreVersion added in v1.1.0

type AnchoreVersion struct {
	API struct {
		Version string `json:"version"`
	} `json:"api"`
	DB struct {
		SchemaVersion string `json:"schema_version"`
	} `json:"db"`
	Service struct {
		Version string `json:"version"`
	} `json:"service"`
}

Jump to

Keyboard shortcuts

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