I want to include event IDs in notifications, e.g. providing the uuid form of the ID in an email for debugging purposes.
Using the email handler template capability, I can create emails using the template Event ID: {{ .ID }} but this is a slice of bytes and is rendered in the resulting email as Event ID: [209 148 75 68 153 63 79 30 190 227 200 57 207 112 180 28]
The SDK implements some helpers for rendering templates, e.g. UnixTime template function. I propose we add a UUIDFromBytes template function which would make the above linked function available to handlers using the SDK.
I want to include event IDs in notifications, e.g. providing the uuid form of the ID in an email for debugging purposes.
Using the email handler template capability, I can create emails using the template
Event ID: {{ .ID }}
but this is a slice of bytes and is rendered in the resulting email asEvent ID: [209 148 75 68 153 63 79 30 190 227 200 57 207 112 180 28]
I believe the UUID representation can be created from a slice of bytes using https://godoc.org/github.com/google/uuid#FromBytes .
The SDK implements some helpers for rendering templates, e.g. UnixTime template function. I propose we add a UUIDFromBytes template function which would make the above linked function available to handlers using the SDK.