You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

cloudevent.proto 1.3 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // https://github.com/cloudevents/spec/blob/main/cloudevents/formats/cloudevents.proto
  2. /**
  3. * CloudEvent Protobuf Format
  4. *
  5. * - Required context attributes are explicitly represented.
  6. * - Optional and Extension context attributes are carried in a map structure.
  7. * - Data may be represented as binary, text, or protobuf messages.
  8. */
  9. syntax = "proto3";
  10. package io.cloudevents.v1;
  11. import "google/protobuf/any.proto";
  12. import "google/protobuf/timestamp.proto";
  13. option csharp_namespace = "Microsoft.AutoGen.Contracts";
  14. message CloudEvent {
  15. // -- CloudEvent Context Attributes
  16. // Required Attributes
  17. string id = 1;
  18. string source = 2; // URI-reference
  19. string spec_version = 3;
  20. string type = 4;
  21. // Optional & Extension Attributes
  22. map<string, CloudEventAttributeValue> attributes = 5;
  23. // -- CloudEvent Data (Bytes, Text, or Proto)
  24. oneof data {
  25. bytes binary_data = 6;
  26. string text_data = 7;
  27. google.protobuf.Any proto_data = 8;
  28. }
  29. /**
  30. * The CloudEvent specification defines
  31. * seven attribute value types...
  32. */
  33. message CloudEventAttributeValue {
  34. oneof attr {
  35. bool ce_boolean = 1;
  36. int32 ce_integer = 2;
  37. string ce_string = 3;
  38. bytes ce_bytes = 4;
  39. string ce_uri = 5;
  40. string ce_uri_ref = 6;
  41. google.protobuf.Timestamp ce_timestamp = 7;
  42. }
  43. }
  44. }