server

package
v0.0.0-...-b8b49be Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implements http.Handler. It validates incoming GitHub webhooks and then dispatches them to the appropriate plugins.

func New

func New(
	tokenGenerator func() []byte, ghc github.Client, log *logrus.Entry,
) *Server

New creates a new server instance.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP validates an incoming webhook and puts it into the event channel.

Jump to

Keyboard shortcuts

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