From a0e131d76efa73531f382ae36420bfed5589c1b0 Mon Sep 17 00:00:00 2001 From: Matheus Pimenta Date: Mon, 1 May 2023 00:41:05 +0100 Subject: [PATCH] Add metadata key for holding an arbitrary identification token Signed-off-by: Matheus Pimenta --- apis/event/v1beta1/metadata.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apis/event/v1beta1/metadata.go b/apis/event/v1beta1/metadata.go index c7104d13..2f864bdd 100644 --- a/apis/event/v1beta1/metadata.go +++ b/apis/event/v1beta1/metadata.go @@ -25,6 +25,13 @@ const ( MetaChecksumKey string = "checksum" // MetaDigestKey is the key used to hold the source artifact digest. MetaDigestKey string = "digest" + // MetaTokenKey is the key used to hold an arbitrary token whose contents + // are defined on a per-event-emitter basis for uniquely identifying the + // contents of the event payload. For example, it could be the generation + // of an object, or the hash of a set of configurations, or even a + // base64-encoded set of configurations. This is useful for example for + // rate limiting the events. + MetaTokenKey string = "token" // MetaCommitStatusKey is the key used to signal a Git commit status event. MetaCommitStatusKey string = "commit_status" // MetaCommitStatusUpdateValue is the value of MetaCommitStatusKey