event

package
v0.0.0-...-57b83e3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EventTypeImagePush   = "image_push"
	EventTypeImageDelete = "image_delete"
	EventTypeChartUpload = "chart_upload"
	EventTypeChartDelete = "chart_delete"
)

const definitions

Variables

This section is empty.

Functions

func GetLocalRegistry

func GetLocalRegistry() *model.Registry

GetLocalRegistry returns the info of the local Harbor registry

func PopulateRegistries

func PopulateRegistries(registryMgr registry.Manager, policy *model.Policy) error

PopulateRegistries populates the source registry and destination registry properties for policy

Types

type Event

type Event struct {
	Type     string
	Resource *model.Resource
}

Event is the model that defines the image/chart pull/push event

type Handler

type Handler interface {
	Handle(event *Event) error
}

Handler is the handler to handle event

func NewHandler

func NewHandler(policyCtl policy.Controller, registryMgr registry.Manager, opCtl operation.Controller) Handler

NewHandler ...

Jump to

Keyboard shortcuts

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