v1alpha2

package
v1.0.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResultListKind       = "FunctionResultList"
	ResultListGroup      = kptfilev1alpha2.KptFileGroup
	ResultListVersion    = kptfilev1alpha2.KptFileVersion
	ResultListAPIVersion = ResultListGroup + "/" + ResultListVersion
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// Image is the full name of the image that generates this result
	// Image and Exec are mutually exclusive
	Image string `yaml:"image,omitempty"`
	// ExecPath is the the absolute os-specific path to the executable file
	ExecPath string `yaml:"exec,omitempty"`
	// TODO(droot): This is required for making structured results subpackage aware.
	// Enable this once test harness supports filepath based assertions.
	// Pkg is OS specific Absolute path to the package.
	// Pkg string `yaml:"pkg,omitempty"`
	// Stderr is the content in function stderr
	Stderr string `yaml:"stderr,omitempty"`
	// ExitCode is the exit code from running the function
	ExitCode int `yaml:"exitCode"`
	// Results is the list of results for the function
	Results []ResultItem `yaml:"results,omitempty"`
}

Result contains the structured result from an individual function

type ResultItem

type ResultItem struct {
	// Message is a human readable message
	Message string `yaml:"message,omitempty"`

	// Severity is the severity of this result
	Severity framework.Severity `yaml:"severity,omitempty"`

	// ResourceRef is a reference to a resource
	ResourceRef yaml.ResourceIdentifier `yaml:"resourceRef,omitempty"`

	// Field is a reference to the field in a resource this result refers to
	Field framework.Field `yaml:"field,omitempty"`

	// File references a file containing the resource this result refers to
	File framework.File `yaml:"file,omitempty"`
}

ResultItem is a duplicate of framework.ResultItem, except that ResourceRef uses yaml.ResourceIdentifier here, whereas framework.ResultItem uses yaml.ResourceMeta. Eventually, we will need to fix it upstream. TODO: https://github.com/GoogleContainerTools/kpt/issues/2091

type ResultList

type ResultList struct {
	yaml.ResourceMeta `yaml:",inline"`
	// ExitCode is the exit code of kpt command
	ExitCode int `yaml:"exitCode"`
	// Items contain a list of function result
	Items []Result `yaml:"items,omitempty"`
}

ResultList contains aggregated results from multiple functions

func NewResultList

func NewResultList() *ResultList

NewResultList returns an instance of ResultList with metadata field populated.

Jump to

Keyboard shortcuts

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