events

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// DeliveryTypeKey is the CloudEvents extension name to filter on for kinds
	// of deliveries.
	DeliveryTypeKey = "chainguarddev1delivery"
	// DeliveryTypeWebhook defines webhook delivery type.
	DeliveryTypeWebhook = "webhook"

	// DeliveryWebhookTargetKey is the CloudEvents extension name to store the
	// target url for webhooks.
	DeliveryWebhookTargetKey = "chainguarddev1webhook"

	// DeliverySubscriptionKey is the CloudEvents extension name to store the
	// subscription id that caused the event.
	DeliverySubscriptionKey = "chainguarddev1subscription"

	// GroupKey is the CloudEvents extension name to store the group associated
	// to the event.
	GroupKey = "group"
	// ClusterKey is the CloudEvents extension name to store the cluster associated
	// to the event.
	ClusterKey = "cluster"
	// ImageKey is the CloudEvents extension name to store the image associated
	// to the event.
	ImageKey = "image"

	// AudienceKey labels an event for its intended audience ["internal", "customer"].
	AudienceKey = "audience"
	// AudienceInternal are events intended for the internal platform.
	AudienceInternal = "internal"
	// AudienceCustomer are events targeting outside the platform.
	AudienceCustomer = "customer"

	// ArrivalTimeKey is the CloudEvents extension name to store the Knative
	// arrival timestamp
	ArrivalTimeKey = "knativearrivaltime"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	// Subject is the identity that triggered this event.
	Subject string `json:"subject"`

	// Actor contains the name/value pairs for each of the claims that were
	// validated to assume the identity whose UIDP appears in Subject above.
	Actor map[string]string `json:"act,omitempty"`
}

Actor is the event payload form of which identity was responsible for the event.

type Eventable

type Eventable interface {
	// CloudEventsSubject returns the subject to use for the cloudevent.
	CloudEventsSubject() string
}

Eventable allows us to define a set of methods that allow event metadata to be collected.

type Extendable

type Extendable interface {
	CloudEventsExtension(key string) (string, bool)
}

Extendable allows us to define a generic method to return extensions based on name.

type Occurrence

type Occurrence struct {
	Actor *Actor `json:"actor,omitempty"`

	// Body is the resource that was created.
	Body interface{} `json:"body,omitempty"`
}

Occurrence is the CloudEvent payload for events.

type Redactable

type Redactable interface {
	CloudEventsRedact() interface{}
}

type WebhookCustomClaims added in v0.1.2

type WebhookCustomClaims struct {
	Webhook struct {
		Digest string `json:"digest"`
	} `json:"webhook"`
}

WebhookCustomClaims holds the custom claims embedded in the webhook's OIDC authorization token.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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