server

package
v0.0.0-...-f1b5324 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2016 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ROUTE = "/{user:.*}/{name:.*}/"

Variables

This section is empty.

Functions

func New

func New(address string, branch string, secret string, logger *logrus.Logger) http.Handler

New returns a new http.Handler that handles github webhooks from the github API.

secret is the secret provided when you register the webhook in the github UI. logger is the standard logger for the application

Types

type GithubHeaders

type GithubHeaders struct {
	GitHubEvent    string
	GitHubDelivery string
	HubSignature   string
}

type Server

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

Server handles github webhooks.

func (*Server) CommitDir

func (h *Server) CommitDir(e github.StatusEvent) ([]string, error)

func (*Server) HandlePullRequestEvent

func (h *Server) HandlePullRequestEvent(g GithubHeaders, e github.PullRequestEvent) error

func (*Server) HandleStatusEvent

func (h *Server) HandleStatusEvent(g GithubHeaders, e github.StatusEvent) error

func (*Server) PRDir

func (h *Server) PRDir(e github.PullRequestEvent) ([]string, error)

func (*Server) ServeHTTP

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

Jump to

Keyboard shortcuts

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