types

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TransformFileExtension is the extension for transformation starlark scripts
	TransformFileExtension = "star"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnswerFnT

type AnswerFnT = func(key string) (answer interface{}, err error)

AnswerFnT is the function used to fetch answers

type DynamicQuestionFnT

type DynamicQuestionFnT = func(question interface{}) (answer interface{}, err error)

DynamicQuestionFnT is provided the questions that must be answered while the script is running

type K8sResourceT

type K8sResourceT = MapT

K8sResourceT is a k8s resource

type KindsAPIVersionsT

type KindsAPIVersionsT = map[string][]string

KindsAPIVersionsT is a map from kind to a list apiVersions used for filtering k8s resources

type MapT

type MapT = map[string]interface{}

MapT is the most common map type

type StaticQuestionFnT

type StaticQuestionFnT = func(question interface{}) error

StaticQuestionFnT is provided the questions that must be answered before running the script

type TransformT

type TransformT interface {
	// Transform applies the transformation on the given k8s resource
	// The k8s resource is changed in place, so the returned resource
	// could be the same object as the input resource.
	Transform(k8sResource K8sResourceT) (K8sResourceT, error)
	// Filter returns true if the transformation can be applied to the given k8s resource
	Filter(k8sResource K8sResourceT) (bool, error)
}

TransformT is a transformation that can be applied to k8s resources

Jump to

Keyboard shortcuts

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