Back to godoc.org

Package server

v0.0.0-...-cdc044f
Latest Go to latest

The highest tagged major version is .

Published: Mar 9, 2020 | License: Apache-2.0 | Module: github.com/d-kuro/kube-transformer

Index

func Run

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

Run is start http server

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)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier