webhook

package
v0.0.0-...-3b732ea Latest Latest
Warning

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

Go to latest
Published: May 15, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller provides us with the handler for webhook HTTP requests.

func NewController

func NewController(k8sclient *k8s.Client, autoDeployLabel, namespace string) *Controller

NewController instantiates a new controller instance for handling webhook requests.

func (*Controller) AutoDeployDockerHub

func (c *Controller) AutoDeployDockerHub(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

AutoDeployDockerHub handles dockerhub webhook requests.

type DockerHubPayload

type DockerHubPayload struct {
	PushData    *DockerHubPushData   `json:"push_data"`
	CallbackURL string               `json:"callback_url"`
	Repository  *DockerHubRepository `json:"repository"`
}

DockerHubPayload is the data structure which holds the form in which request bodies are expected to be in when Docker hub invokes the webhook from a build trigger.

type DockerHubPushData

type DockerHubPushData struct {
	PushedAt int64    `json:"pushed_at"`
	Images   []string `json:"images"`
	Tag      string   `json:"tag"`
	Pusher   string   `json:"pusher"`
}

DockerHubPushData holds information specific to the push event from a Docker hub trigger.

type DockerHubRepository

type DockerHubRepository struct {
	CommentCount    int64  `json:"comment_count"`
	DateCreated     int64  `json:"date_created"`
	Description     string `json:"description"`
	Dockerfile      string `json:"dockerfile"`
	FullDescription string `json:"full_description"`
	IsOfficial      bool   `json:"is_official"`
	IsPrivate       bool   `json:"is_private"`
	IsTrusted       bool   `json:"is_trusted"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	Owner           string `json:"owner"`
	RepoName        string `json:"repo_name"`
	RepoURL         string `json:"repo_url"`
	StarCount       int64  `json:"star_count"`
	Status          string `json:"status"`
}

DockerHubRepository provides that data structure for all information about the docker repository the build occured for.

Jump to

Keyboard shortcuts

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