server

package
v0.0.0-...-cdc044f Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, h http.Handler) error

Run is start http server

Types

type Detail

type Detail struct {
	Result         string `json:"result"`
	RepositoryName string `json:"repository-name"`
	ImageDigest    string `json:"image-digest"`
	ActionType     string `json:"action-type"`
	ImageTag       string `json:"image-tag"`
}

Detail is Amazon EventBridge events details see: https://docs.aws.amazon.com/AmazonECR/latest/userguide/ecr-eventbridge.html

type Event

type Event struct {
	Version    string   `json:"version"`
	ID         string   `json:"id"`
	DetailType string   `json:"detail-type"`
	Source     string   `json:"source"`
	Account    string   `json:"account"`
	Time       string   `json:"time"`
	Region     string   `json:"region"`
	Resources  []string `json:"resources"`
	Detail     Detail   `json:"detail"`
}

Event is Amazon EventBridge events see: https://docs.aws.amazon.com/AmazonECR/latest/userguide/ecr-eventbridge.html

type WebhookHandler

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

func NewWebhookHandler

func NewWebhookHandler(
	repos map[string]*git.Repository, conf *config.Config,
	filter []*regexp.Regexp, k8sclient *kubernetes.Client) *WebhookHandler

func (*WebhookHandler) ServeHTTP

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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