webhook

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AsyncSuccessCode is the http status code returned for a successful async job
	AsyncSuccessCode = 202

	// AsyncSuccessMessage is the generic message returned for a successful async job
	AsyncSuccessMessage = "202 accepted"

	// SyncSuccessCode is the http status code returned for a successful synchronous job
	SyncSuccessCode = 201

	// SyncSuccessMessage is the generic message returned for a successful synchronous job
	SyncSuccessMessage = "201 created"
)

Variables

This section is empty.

Functions

func APIToken

func APIToken(t string)

APIToken sets the (global) apiToken for the webhook package

func DockerBuild

func DockerBuild(w http.ResponseWriter, req *http.Request) (int, string)

DockerBuild parses a simple JSON blob returns a job.Spec

func Github

func Github(w http.ResponseWriter, req *http.Request) (int, string)

Github parses a Github webhook HTTP request and returns a job.Spec.

func Logger

func Logger(l *logrus.Logger)

Logger sets the (global) logger for the webhook package

func TestMode

func TestMode(b bool)

TestMode sets the (global) testMode variable for the webhook package

func Travis

func Travis(w http.ResponseWriter, req *http.Request) (int, string)

Travis parses a webhook HTTP request from Travis CI and returns a job.Spec

Types

This section is empty.

Jump to

Keyboard shortcuts

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