template

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// OldEscapeAnnotation is used to determine whether or not a TriggerTemplate
	// should retain the old "replace quotes with backslack quote" behaviour
	// when templating in params.
	//
	// This can be removed when this functionality is no-longer needed.
	OldEscapeAnnotation = "triggers.tekton.dev/old-escape-quotes"
)

Variables

View Source
var UUID = func() string { return uuid.New().String() }

UUID generates a Universally Unique IDentifier following RFC 4122.

Functions

func ResolveParams added in v0.2.0

func ResolveParams(rt ResolvedTrigger, body []byte, header http.Header, extensions map[string]interface{}, triggerContext TriggerContext) ([]triggersv1.Param, error)

ResolveParams takes given triggerbindings and produces the resulting resource params.

func ResolveResources added in v0.2.0

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

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

Types

type ResolvedTrigger added in v0.2.0

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 added in v0.2.0

func ResolveTrigger(trigger triggersv1.Trigger, 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.

type TriggerContext added in v0.22.0

type TriggerContext struct {
	EventID string `json:"eventID"`
}

func NewTriggerContext added in v0.22.0

func NewTriggerContext(eventID string) TriggerContext

Jump to

Keyboard shortcuts

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