interceptors

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInterceptorParams added in v0.10.0

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

GetInterceptorParams returns InterceptorParams for the current interceptors

func GetSecretToken

func GetSecretToken(req *http.Request, cs kubernetes.Interface, sr *triggersv1.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.

Types

type Interceptor

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

Interceptor is the interface that all interceptors implement.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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