v1

package
v1.0.0-beta.64 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true

Index

Constants

View Source
const (
	// Deprecated: prefer ResultListGVK
	ResultListKind = "FunctionResultList"
	// Deprecated: prefer ResultListGVK
	ResultListGroup = "kpt.dev"
	// Deprecated: prefer ResultListGVK
	ResultListVersion = "v1"
	// Deprecated: prefer ResultListGVK
	ResultListAPIVersion = ResultListGroup + "/" + ResultListVersion
)

Variables

This section is empty.

Functions

func ResultListGVK

func ResultListGVK() schema.GroupVersionKind

KptFileGVK is the GroupVersionKind of FunctionResultList objects

Types

type Field

type Field struct {
	Path string `yaml:"path,omitempty" json:"path,omitempty"`

	CurrentValue string `yaml:"currentValue,omitempty" json:"currentValue,omitempty"`

	ProposedValue string `yaml:"proposedValue,omitempty" json:"proposedValue,omitempty"`
}

Field is a modified version of sigs.k8s.io/kustomize/kyaml/fn/framework.Field where CurrentValue and ProposedValue are strings instead of interface{} values.

func (*Field) DeepCopy

func (in *Field) DeepCopy() *Field

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Field.

func (*Field) DeepCopyInto

func (in *Field) DeepCopyInto(out *Field)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Field) UnmarshalJSON

func (in *Field) UnmarshalJSON(data []byte) error

func (*Field) UnmarshalYAML

func (in *Field) UnmarshalYAML(value *yaml.Node) error

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
	// If user provides an executable file with commands, ExecPath should
	// contain the entire input string.
	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

func (*Result) DeepCopy

func (in *Result) DeepCopy() *Result

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Result.

func (*Result) DeepCopyInto

func (in *Result) DeepCopyInto(out *Result)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResultItem

type ResultItem struct {
	Message string `yaml:"message,omitempty" json:"message,omitempty"`

	Severity framework.Severity `yaml:"severity,omitempty" json:"severity,omitempty"`

	ResourceRef *yaml.ResourceIdentifier `yaml:"resourceRef,omitempty" json:"resourceRef,omitempty"`

	Field *Field `yaml:"field,omitempty" json:"field,omitempty"`

	File *framework.File `yaml:"file,omitempty" json:"file,omitempty"`

	Tags map[string]string `yaml:"tags,omitempty" json:"tags,omitempty"`
}

ResultItem is a modified version of sigs.k8s.io/kustomize/kyaml/fn/framework.Result with a simplified Field field.

func (*ResultItem) DeepCopy

func (in *ResultItem) DeepCopy() *ResultItem

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResultItem.

func (*ResultItem) DeepCopyInto

func (in *ResultItem) DeepCopyInto(out *ResultItem)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResultItem) String

func (i *ResultItem) String() string

String provides a human-readable message for the result item

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.

func (*ResultList) DeepCopy

func (in *ResultList) DeepCopy() *ResultList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResultList.

func (*ResultList) DeepCopyInto

func (in *ResultList) DeepCopyInto(out *ResultList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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