event

package
Version: v0.0.0-...-b6de84c Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 97

Documentation

Index

Constants

View Source
const (
	EventTypeArtifactPush   = "artifact_push"
	EventTypeArtifactDelete = "artifact_delete"
	EventTypeTagDelete      = "tag_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