interceptors

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 12 Imported by: 14

Documentation

Index

Constants

View Source
const (
	CoreInterceptorsHost = "tekton-triggers-core-interceptors"
)
View Source
const RequestCacheKey key = "interceptors.RequestCache"

Variables

This section is empty.

Functions

func Canonical added in v0.11.0

func Canonical(h map[string][]string) http.Header

Canonical updates the map keys to use the Canonical name

func Execute added in v0.11.0

func Fail added in v0.11.0

Fail constructs a InterceptorResponse that should not continue further processing.

func Failf added in v0.11.0

func Failf(c codes.Code, format string, a ...interface{}) *triggersv1beta1.InterceptorResponse

Failf constructs a InterceptorResponse that should not continue further processing.

func GetInterceptorParams added in v0.10.0

func GetInterceptorParams(i *triggersv1beta1.EventInterceptor) map[string]interface{}

GetInterceptorParams returns InterceptorParams for the current interceptors

func GetSecretToken

func GetSecretToken(req *http.Request, sl corev1lister.SecretLister, sr *triggersv1beta1.SecretRef, triggerNS string) ([]byte, error)

GetSecretToken queries Kubernetes for the given secret reference. We use this function to resolve secret material like GitHub webhook secrets, and call it once for every trigger that references it.

As we may have many triggers that all use the same secret, we cache the secret values in the request cache.

func ResolveToURL added in v0.13.0

func ResolveToURL(getter InterceptorGetter, name string) (*apis.URL, error)

ResolveToURL finds an Interceptor's URL.

func UnmarshalParams added in v0.11.0

func UnmarshalParams(ip map[string]interface{}, p interface{}) error

UnmarshalParams unmarshalls the passed in InterceptorParams into the provided param struct

Types

type Interceptor

type Interceptor interface {
	ExecuteTrigger(req *http.Request) (*http.Response, error)
}

Interceptor is the interface that all interceptors implement.

type InterceptorGetter added in v0.13.0

type InterceptorGetter func(name string) (*triggersv1alpha1.ClusterInterceptor, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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