github

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTemplate = `{{ .Repository.FullName }}:{{ .Deployment.Sha }}`

Functions

func Image

func Image(t string, d events.Deployment) (image.Image, error)

Image returns an image.Image for the given deployment.

func New

func New(e *empire.Empire, opts Options) httpx.Handler

func Ping

func Ping(w http.ResponseWriter, r *http.Request)

Types

type DeploymentHandler

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

Deployment is an http.Handler for handling the `deployment` event.

func (*DeploymentHandler) ServeHTTP

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

func (*DeploymentHandler) ServeHTTPContext

func (h *DeploymentHandler) ServeHTTPContext(ctx context.Context, w http.ResponseWriter, r *http.Request) error

type Empire added in v0.10.0

type Empire interface {
	Deploy(context.Context, empire.DeploymentsCreateOpts) (*empire.Release, error)
}

Empire mocks the Empire interface we use.

type Options

type Options struct {
	// The GitHub secret to ensure that the request was sent from GitHub.
	Secret string

	// If provided, specifies the environments that this Empire instance
	// should handle deployments for.
	Environments []string

	// ImageTemplate is used to determine the image to deploy.
	ImageTemplate string

	// TugboatURL can be provided if you want to send deployment logs to a
	// Tugboat instance.
	TugboatURL string
}

Jump to

Keyboard shortcuts

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