template

package
v0.0.0-...-af2e4d2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UID = func() string { return rand.String(5) }

UID generates a random string like the Kubernetes apiserver generateName metafield postfix.

Functions

func ResolveParams

func ResolveParams(rt ResolvedTrigger, body []byte, header http.Header) ([]triggersv1.Param, error)

ResolveParams takes given triggerbindings and produces the resulting resource params.

func ResolveResources

func ResolveResources(template *triggersv1.TriggerTemplate, params []triggersv1.Param) []json.RawMessage

ResolveResources resolves a templated resource by replacing params with their values.

Types

type ResolvedTrigger

type ResolvedTrigger struct {
	TriggerBindings        []*triggersv1.TriggerBinding
	ClusterTriggerBindings []*triggersv1.ClusterTriggerBinding
	TriggerTemplate        *triggersv1.TriggerTemplate
	BindingParams          []triggersv1.Param
}

ResolvedTrigger contains the dereferenced TriggerBindings and TriggerTemplate after resolving the k8s ObjectRef.

func ResolveTrigger

func ResolveTrigger(trigger triggersv1.EventListenerTrigger, getTB getTriggerBinding, getCTB getClusterTriggerBinding, getTT getTriggerTemplate) (ResolvedTrigger, error)

ResolveTrigger takes in a trigger containing object refs to bindings and templates and resolves them to their underlying values.

Jump to

Keyboard shortcuts

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