From 3f1add6c9f5a41500cd6cfc96c5200d2c8291e14 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 6 Jun 2024 07:11:28 -0600 Subject: [PATCH] events: Getters for event info (close #6377) --- modules/caddyevents/app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/caddyevents/app.go b/modules/caddyevents/app.go index 902c6d84..fe76a675 100644 --- a/modules/caddyevents/app.go +++ b/modules/caddyevents/app.go @@ -355,6 +355,11 @@ type Event struct { origin caddy.Module } +func (e Event) ID() uuid.UUID { return e.id } +func (e Event) Timestamp() time.Time { return e.ts } +func (e Event) Name() string { return e.name } +func (e Event) Origin() caddy.Module { return e.origin } + // CloudEvent exports event e as a structure that, when // serialized as JSON, is compatible with the // CloudEvents spec.