Documentation
¶
Index ¶
Constants ¶
View Source
const Prefix = "application/cloudevents"
Prefix for event-format media types.
Variables ¶
View Source
var JSON = jsonFmt{}
JSON is the built-in "application/cloudevents+json" format.
Functions ¶
Types ¶
type Format ¶
type Format interface { // MediaType identifies the format MediaType() string // Marshal event to bytes Marshal(*event.Event) ([]byte, error) // Unmarshal bytes to event Unmarshal([]byte, *event.Event) error }
Format marshals and unmarshals structured events to bytes.
type UnknownFormat ¶
type UnknownFormat string
UnknownFormat allows an event with an unknown format string to be forwarded, but Marshal() and Unmarshal will always fail.
func (UnknownFormat) MediaType ¶
func (uf UnknownFormat) MediaType() string
Click to show internal directories.
Click to hide internal directories.