applicationsnapshot

package
v0.0.0-...-06b94e1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSON    = "json"
	YAML    = "yaml"
	HACBS   = "hacbs"
	Summary = "summary"
	JUNIT   = "junit"
)

Possible formats the report can be written as.

Variables

This section is empty.

Functions

func DetermineInputSpec

func DetermineInputSpec(ctx context.Context, input Input) (*app.SnapshotSpec, error)

Types

type Component

type Component struct {
	app.SnapshotComponent
	Violations []conftestOutput.Result  `json:"violations,omitempty"`
	Warnings   []conftestOutput.Result  `json:"warnings,omitempty"`
	Successes  []conftestOutput.Result  `json:"successes,omitempty"`
	Success    bool                     `json:"success"`
	Signatures []output.EntitySignature `json:"signatures,omitempty"`
}

type Input

type Input struct {
	File     string
	JSON     string
	Image    string
	Snapshot string
}

type Report

type Report struct {
	Success bool `json:"success"`

	Snapshot   string                           `json:"snapshot,omitempty"`
	Components []Component                      `json:"components"`
	Key        string                           `json:"key"`
	Policy     ecc.EnterpriseContractPolicySpec `json:"policy"`
	// contains filtered or unexported fields
}

func NewReport

func NewReport(snapshot string, components []Component, policy policy.Policy) (Report, error)

WriteReport returns a new instance of Report representing the state of components from the snapshot.

func (Report) WriteAll

func (r Report) WriteAll(targets []string, p format.TargetParser) (allErrors error)

WriteAll writes the report to all the given targets.

Jump to

Keyboard shortcuts

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