server

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPlugin

func AddPlugin(events []git.EventType, p Plugin)

AddPlugin adds handler for specific events

func HandleEvent added in v0.2.3

func HandleEvent(wh *git.Webhook, ic *cicdv1.IntegrationConfig, wantedPlugins ...string) error

HandleEvent passes webhook event to plugins

func New

func New(c client.Client, cfg *rest.Config) *server

New is a constructor of a server

Types

type Plugin

type Plugin interface {
	Name() string
	Handle(*git.Webhook, *cicdv1.IntegrationConfig) error
}

Plugin is a webhook plugin interface, which handles git webhook payloads

type Server

type Server interface {
	Start()
}

Server is an interface of server

Jump to

Keyboard shortcuts

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