Documentation ¶
Index ¶
- Constants
- func Canonical(h map[string][]string) http.Header
- func Execute(ctx context.Context, client *http.Client, req *triggersv1.InterceptorRequest, ...) (*triggersv1.InterceptorResponse, error)
- func Fail(c codes.Code, msg string) *triggersv1.InterceptorResponse
- func Failf(c codes.Code, format string, a ...interface{}) *triggersv1.InterceptorResponse
- func GetInterceptorParams(i *triggersv1.EventInterceptor) map[string]interface{}
- func GetSecretToken(req *http.Request, cs kubernetes.Interface, sr *triggersv1.SecretRef, ...) ([]byte, error)
- func ResolveToURL(getter InterceptorGetter, name string) (*apis.URL, error)
- func UnmarshalParams(ip map[string]interface{}, p interface{}) error
- type Interceptor
- type InterceptorGetter
Constants ¶
const (
CoreInterceptorsHost = "tekton-triggers-core-interceptors"
)
const RequestCacheKey key = "interceptors.RequestCache"
Variables ¶
This section is empty.
Functions ¶
func Execute ¶ added in v0.11.0
func Execute(ctx context.Context, client *http.Client, req *triggersv1.InterceptorRequest, url string) (*triggersv1.InterceptorResponse, error)
func Fail ¶ added in v0.11.0
func Fail(c codes.Code, msg string) *triggersv1.InterceptorResponse
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{}) *triggersv1.InterceptorResponse
Failf constructs a InterceptorResponse that should not continue further processing.
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. TODO: we don't really use the cache here. Instead use a secretLister?
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
UnmarshalParams unmarshalls the passed in InterceptorParams into the provided param struct
Types ¶
type Interceptor ¶
Interceptor is the interface that all interceptors implement.
type InterceptorGetter ¶ added in v0.13.0
type InterceptorGetter func(name string) (*triggersv1.ClusterInterceptor, error)