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

server

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 13 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

func HandleEvent(wh *git.Webhook, ic *cdv1.Application) error

HandleEvent passes webhook event to plugins

Types

type HTTPServer

type HTTPServer struct {
	// contains filtered or unexported fields
}

server is a HTTP server for git webhook API and report page

func New

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

New is a constructor of a server

func (*HTTPServer) Start

func (s *HTTPServer) Start()

Start starts the server

type Plugin

type Plugin interface {
	Handle(*git.Webhook, *cdv1.Application) 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