Help us shape the future of Go! Take the 2026 Go Developer Survey

server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 20 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) 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 {
	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