Documentation ¶
Index ¶
- Constants
- func InterpolateLeafNode(executor TemplateExecutor, template []byte, tagInterpolator tagInterpolator) (interface{}, error)
- func NewClusterConfigTemplateModel(template *v1alpha1.ClusterConfigTemplate, eval evaluator) *clusterConfigTemplate
- func NewClusterDeploymentTemplateModel(template *v1alpha1.ClusterDeploymentTemplate, eval evaluator) *clusterDeploymentTemplate
- func NewClusterImageTemplateModel(template *v1alpha1.ClusterImageTemplate, eval evaluator) *clusterImageTemplate
- func NewClusterSourceTemplateModel(template *v1alpha1.ClusterSourceTemplate, eval evaluator) *clusterSourceTemplate
- func NewClusterTemplateModel(template *v1alpha1.ClusterTemplate) *clusterTemplate
- type ClusterRunTemplate
- type Config
- type ConfigInput
- type DeploymentConditionError
- type DeploymentFailedConditionMetError
- type Image
- type ImageInput
- type Inputs
- type JsonPathContext
- type JsonPathError
- type Labels
- type ObservedGenerationError
- type Output
- type Outputs
- type Params
- type Source
- type SourceInput
- type Stamper
- type StandardTagInterpolator
- type Template
- type TemplateExecutor
Constants ¶
View Source
const PREVIEW_CHARACTER_LIMIT = 1024
View Source
const SuccessStatusPath = `status.conditions[?(@.type=="Succeeded")].status`
Variables ¶
This section is empty.
Functions ¶
func InterpolateLeafNode ¶
func InterpolateLeafNode(executor TemplateExecutor, template []byte, tagInterpolator tagInterpolator) (interface{}, error)
InterpolateLeafNode merges the context variables anywhere a $(<<jsonPath>>)$ tag is found It validates that the jsonPath refers to objects within the context
func NewClusterConfigTemplateModel ¶
func NewClusterConfigTemplateModel(template *v1alpha1.ClusterConfigTemplate, eval evaluator) *clusterConfigTemplate
func NewClusterDeploymentTemplateModel ¶ added in v0.0.7
func NewClusterDeploymentTemplateModel(template *v1alpha1.ClusterDeploymentTemplate, eval evaluator) *clusterDeploymentTemplate
func NewClusterImageTemplateModel ¶
func NewClusterImageTemplateModel(template *v1alpha1.ClusterImageTemplate, eval evaluator) *clusterImageTemplate
func NewClusterSourceTemplateModel ¶
func NewClusterSourceTemplateModel(template *v1alpha1.ClusterSourceTemplate, eval evaluator) *clusterSourceTemplate
func NewClusterTemplateModel ¶
func NewClusterTemplateModel(template *v1alpha1.ClusterTemplate) *clusterTemplate
Types ¶
type ClusterRunTemplate ¶ added in v0.0.7
type ClusterRunTemplate interface { GetName() string GetResourceTemplate() v1alpha1.TemplateSpec GetLatestSuccessfulOutput(stampedObjects []*unstructured.Unstructured) (Outputs, *unstructured.Unstructured, error) }
func NewRunTemplateModel ¶ added in v0.0.5
func NewRunTemplateModel(template *v1alpha1.ClusterRunTemplate) ClusterRunTemplate
type ConfigInput ¶
type ConfigInput struct { Config interface{} `json:"config"` Name string `json:"name"` }
type DeploymentConditionError ¶ added in v0.0.8
type DeploymentConditionError struct {
Err error
}
func NewDeploymentConditionError ¶ added in v0.0.8
func NewDeploymentConditionError(err error) DeploymentConditionError
func (DeploymentConditionError) Error ¶ added in v0.0.8
func (e DeploymentConditionError) Error() string
type DeploymentFailedConditionMetError ¶ added in v0.0.8
type DeploymentFailedConditionMetError struct {
Err error
}
func NewDeploymentFailedConditionMetError ¶ added in v0.0.8
func NewDeploymentFailedConditionMetError(err error) DeploymentFailedConditionMetError
func (DeploymentFailedConditionMetError) Error ¶ added in v0.0.8
func (e DeploymentFailedConditionMetError) Error() string
type ImageInput ¶
type ImageInput struct { Image interface{} `json:"image"` Name string `json:"name"` }
type Inputs ¶
type Inputs struct { Sources map[string]SourceInput Images map[string]ImageInput Configs map[string]ConfigInput Deployment *SourceInput }
func (Inputs) OnlyConfig ¶ added in v0.0.6
func (i Inputs) OnlyConfig() interface{}
func (Inputs) OnlySource ¶ added in v0.0.6
func (i Inputs) OnlySource() *SourceInput
type JsonPathContext ¶
type JsonPathContext interface{}
JsonPathContext is any structure that you intend for jsonpath to treat as it's context. typically any struct with template-specific json structure tags
type JsonPathError ¶
type JsonPathError struct { Err error // contains filtered or unexported fields }
func NewJsonPathError ¶
func NewJsonPathError(expression string, err error) JsonPathError
func (JsonPathError) Error ¶
func (e JsonPathError) Error() string
func (JsonPathError) JsonPathExpression ¶
func (e JsonPathError) JsonPathExpression() string
type ObservedGenerationError ¶ added in v0.0.8
type ObservedGenerationError struct {
Err error
}
func NewObservedGenerationError ¶ added in v0.0.8
func NewObservedGenerationError(err error) ObservedGenerationError
func (ObservedGenerationError) Error ¶ added in v0.0.8
func (e ObservedGenerationError) Error() string
type Outputs ¶ added in v0.0.5
type Outputs map[string]apiextensionsv1.JSON
type Params ¶
type Params map[string]apiextensionsv1.JSON
func ParamsBuilder ¶
func ParamsBuilder( templateParams []v1alpha1.TemplateParam, blueprintParams []v1alpha1.BlueprintParam, resourceParams []v1alpha1.BlueprintParam, ownerParams []v1alpha1.OwnerParam, ) Params
type Source ¶
type Source struct { URL interface{} `json:"url"` Revision interface{} `json:"revision"` }
type SourceInput ¶
type SourceInput struct { URL interface{} `json:"url"` Revision interface{} `json:"revision"` Name string `json:"name"` }
type Stamper ¶
type Stamper struct { TemplatingContext JsonPathContext Owner client.Object Labels Labels }
func StamperBuilder ¶
func StamperBuilder(owner client.Object, templatingContext JsonPathContext, labels Labels) Stamper
func (*Stamper) Stamp ¶
func (s *Stamper) Stamp(ctx context.Context, resourceTemplate v1alpha1.TemplateSpec) (*unstructured.Unstructured, error)
type StandardTagInterpolator ¶
type StandardTagInterpolator struct { Context JsonPathContext Evaluator evaluator }
func (StandardTagInterpolator) Evaluate ¶
func (t StandardTagInterpolator) Evaluate(tag string) (interface{}, error)
func (StandardTagInterpolator) InterpolateTag ¶
type Template ¶
type Template interface { GetResourceTemplate() v1alpha1.TemplateSpec GetDefaultParams() v1alpha1.TemplateParams GetHealthRule() *v1alpha1.HealthRule GetOutput() (*Output, error) GenerateResourceOutput(output *Output) ([]v1alpha1.Output, error) SetInputs(*Inputs) SetStampedObject(stampedObject *unstructured.Unstructured) GetName() string GetKind() string }
type TemplateExecutor ¶
type TemplateExecutor func(template, startTag, endTag string, f fasttemplate.TagFunc) (string, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.