docker

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(payload []byte) (hooks.PushEvent, error)

Parse parses a payload into a Docker webhook event.

Types

type PushData

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

PushData is part of the Webhook struct.

type Repository

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

Repository is part of the Webhook struct.

type Webhook

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

Webhook is a struct for the Docker Hub webhook event.

func (Webhook) EventRepository

func (p Webhook) EventRepository() string

EventRepository is an implementation of the hooks.PushEvent interface.

func (Webhook) EventTag

func (p Webhook) EventTag() string

EventTag is an implementation of the hooks.PushEvent interface.

func (Webhook) PushedImageURL

func (p Webhook) PushedImageURL() string

PushedImageURL is an implementation of the hooks.PushEvent interface.

Jump to

Keyboard shortcuts

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