Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CloudEvent

A CloudEvent describes event data in common formats to provide interoperability across services, platforms and systems.

see

https://github.com/cloudevents/spec/blob/v1.0/spec.md

Hierarchy

  • CloudEvent

Index

Constructors

constructor

Accessors

data

  • get data(): any

dataContentEncoding

  • get dataContentEncoding(): any

dataContentType

  • get dataContentType(): any

dataSchema

  • get dataSchema(): any

id

  • get id(): any

schemaURL

  • get schemaURL(): any

source

  • get source(): any

specversion

  • get specversion(): any

subject

  • get subject(): any

time

  • get time(): any

type

  • get type(): any

Methods

addExtension

  • addExtension(key: string, value: any): void

format

  • format(): any
  • Formats the CloudEvent as JSON. Validates the event according to the CloudEvent specification and throws an exception if it's invalid.

    throws

    {ValidationError} if this event cannot be validated against the specification

    Returns any

    the CloudEvent in JSON form

getExtensions

  • getExtensions(): {}

toString

  • toString(): any
  • Formats the CloudEvent as JSON. No specification validation is performed.

    Returns any

    the CloudEvent as a JSON string

Generated using TypeDoc