webhook

package
v1.16.12-beta014 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookListener

type WebhookListener struct {
	Uri        string
	Log        *zap.SugaredLogger
	HttpClient *http.Client
	// contains filtered or unexported fields
}

func NewWebhookListener

func NewWebhookListener(name, uri, selector string, events []testkube.EventType,
	payloadObjectField, payloadTemplate string, headers map[string]string) *WebhookListener

func (*WebhookListener) Events

func (l *WebhookListener) Events() []testkube.EventType

func (*WebhookListener) Headers added in v1.13.0

func (l *WebhookListener) Headers() map[string]string

func (*WebhookListener) Kind

func (l *WebhookListener) Kind() string

func (*WebhookListener) Metadata

func (l *WebhookListener) Metadata() map[string]string

func (*WebhookListener) Name added in v1.5.17

func (l *WebhookListener) Name() string

func (*WebhookListener) Notify

func (l *WebhookListener) Notify(event testkube.Event) (result testkube.EventResult)

func (*WebhookListener) PayloadObjectField added in v1.10.16

func (l *WebhookListener) PayloadObjectField() string

func (*WebhookListener) PayloadTemplate added in v1.13.0

func (l *WebhookListener) PayloadTemplate() string

func (*WebhookListener) Selector

func (l *WebhookListener) Selector() string

type WebhooksLister

type WebhooksLister interface {
	List(selector string) (*executorsv1.WebhookList, error)
}

WebhooksLister loads webhooks from kubernetes

type WebhooksLoader

type WebhooksLoader struct {
	WebhooksClient WebhooksLister
	// contains filtered or unexported fields
}

func NewWebhookLoader

func NewWebhookLoader(log *zap.SugaredLogger, webhooksClient WebhooksLister, templatesClient templatesclientv1.Interface) *WebhooksLoader

func (WebhooksLoader) Kind

func (r WebhooksLoader) Kind() string

func (WebhooksLoader) Load

func (r WebhooksLoader) Load() (listeners common.Listeners, err error)

Jump to

Keyboard shortcuts

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