Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCloudEventServiceServer(s grpc.ServiceRegistrar, srv CloudEventServiceServer)
- type CloudEvent
- func (*CloudEvent) Descriptor() ([]byte, []int)deprecated
- func (x *CloudEvent) GetAttributes() map[string]*CloudEventAttributeValue
- func (x *CloudEvent) GetBinaryData() []byte
- func (m *CloudEvent) GetData() isCloudEvent_Data
- func (x *CloudEvent) GetId() string
- func (x *CloudEvent) GetProtoData() *any1.Any
- func (x *CloudEvent) GetSource() string
- func (x *CloudEvent) GetSpecVersion() string
- func (x *CloudEvent) GetTextData() string
- func (x *CloudEvent) GetType() string
- func (*CloudEvent) ProtoMessage()
- func (x *CloudEvent) ProtoReflect() protoreflect.Message
- func (x *CloudEvent) Reset()
- func (x *CloudEvent) String() string
- type CloudEventAttributeValue
- func (*CloudEventAttributeValue) Descriptor() ([]byte, []int)deprecated
- func (m *CloudEventAttributeValue) GetAttr() isCloudEventAttributeValue_Attr
- func (x *CloudEventAttributeValue) GetCeBoolean() bool
- func (x *CloudEventAttributeValue) GetCeBytes() []byte
- func (x *CloudEventAttributeValue) GetCeInteger() int32
- func (x *CloudEventAttributeValue) GetCeString() string
- func (x *CloudEventAttributeValue) GetCeTimestamp() *timestamp.Timestamp
- func (x *CloudEventAttributeValue) GetCeUri() string
- func (x *CloudEventAttributeValue) GetCeUriRef() string
- func (*CloudEventAttributeValue) ProtoMessage()
- func (x *CloudEventAttributeValue) ProtoReflect() protoreflect.Message
- func (x *CloudEventAttributeValue) Reset()
- func (x *CloudEventAttributeValue) String() string
- type CloudEventAttributeValue_CeBoolean
- type CloudEventAttributeValue_CeBytes
- type CloudEventAttributeValue_CeInteger
- type CloudEventAttributeValue_CeString
- type CloudEventAttributeValue_CeTimestamp
- type CloudEventAttributeValue_CeUri
- type CloudEventAttributeValue_CeUriRef
- type CloudEventServiceClient
- type CloudEventServiceServer
- type CloudEventService_SubscribeClient
- type CloudEventService_SubscribeServer
- type CloudEvent_BinaryData
- type CloudEvent_ProtoData
- type CloudEvent_TextData
- type PublishRequest
- type SubscriptionRequest
- func (*SubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscriptionRequest) GetSource() string
- func (*SubscriptionRequest) ProtoMessage()
- func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *SubscriptionRequest) Reset()
- func (x *SubscriptionRequest) String() string
- type UnimplementedCloudEventServiceServer
- type UnsafeCloudEventServiceServer
Constants ¶
const ( CloudEventService_Publish_FullMethodName = "/io.cloudevents.v1.CloudEventService/Publish" CloudEventService_Subscribe_FullMethodName = "/io.cloudevents.v1.CloudEventService/Subscribe" )
Variables ¶
var CloudEventService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "io.cloudevents.v1.CloudEventService", HandlerType: (*CloudEventServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Publish", Handler: _CloudEventService_Publish_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _CloudEventService_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "cloudevent.proto", }
CloudEventService_ServiceDesc is the grpc.ServiceDesc for CloudEventService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cloudevent_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCloudEventServiceServer ¶
func RegisterCloudEventServiceServer(s grpc.ServiceRegistrar, srv CloudEventServiceServer)
Types ¶
type CloudEvent ¶
type CloudEvent struct { // Unique event identifier. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // URI of the event source. Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // Version of the spec in use. SpecVersion string `protobuf:"bytes,3,opt,name=spec_version,json=specVersion,proto3" json:"spec_version,omitempty"` // Event type identifier. Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // Optional & Extension Attributes Attributes map[string]*CloudEventAttributeValue `` /* 161-byte string literal not displayed */ // CloudEvent Data (Bytes, Text, or Proto) // // Types that are assignable to Data: // // *CloudEvent_BinaryData // *CloudEvent_TextData // *CloudEvent_ProtoData Data isCloudEvent_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
CloudEvent is copied from https://github.com/cloudevents/spec/blob/main/cloudevents/formats/protobuf-format.md.
func (*CloudEvent) Descriptor
deprecated
func (*CloudEvent) Descriptor() ([]byte, []int)
Deprecated: Use CloudEvent.ProtoReflect.Descriptor instead.
func (*CloudEvent) GetAttributes ¶
func (x *CloudEvent) GetAttributes() map[string]*CloudEventAttributeValue
func (*CloudEvent) GetBinaryData ¶
func (x *CloudEvent) GetBinaryData() []byte
func (*CloudEvent) GetData ¶
func (m *CloudEvent) GetData() isCloudEvent_Data
func (*CloudEvent) GetId ¶
func (x *CloudEvent) GetId() string
func (*CloudEvent) GetProtoData ¶
func (x *CloudEvent) GetProtoData() *any1.Any
func (*CloudEvent) GetSource ¶
func (x *CloudEvent) GetSource() string
func (*CloudEvent) GetSpecVersion ¶
func (x *CloudEvent) GetSpecVersion() string
func (*CloudEvent) GetTextData ¶
func (x *CloudEvent) GetTextData() string
func (*CloudEvent) GetType ¶
func (x *CloudEvent) GetType() string
func (*CloudEvent) ProtoMessage ¶
func (*CloudEvent) ProtoMessage()
func (*CloudEvent) ProtoReflect ¶
func (x *CloudEvent) ProtoReflect() protoreflect.Message
func (*CloudEvent) Reset ¶
func (x *CloudEvent) Reset()
func (*CloudEvent) String ¶
func (x *CloudEvent) String() string
type CloudEventAttributeValue ¶
type CloudEventAttributeValue struct { // The value can be any one of these types. // // Types that are assignable to Attr: // // *CloudEventAttributeValue_CeBoolean // *CloudEventAttributeValue_CeInteger // *CloudEventAttributeValue_CeString // *CloudEventAttributeValue_CeBytes // *CloudEventAttributeValue_CeUri // *CloudEventAttributeValue_CeUriRef // *CloudEventAttributeValue_CeTimestamp Attr isCloudEventAttributeValue_Attr `protobuf_oneof:"attr"` // contains filtered or unexported fields }
CloudEventAttribute enables extensions to use any of the seven allowed data types as the value of an envelope key.
func (*CloudEventAttributeValue) Descriptor
deprecated
func (*CloudEventAttributeValue) Descriptor() ([]byte, []int)
Deprecated: Use CloudEventAttributeValue.ProtoReflect.Descriptor instead.
func (*CloudEventAttributeValue) GetAttr ¶
func (m *CloudEventAttributeValue) GetAttr() isCloudEventAttributeValue_Attr
func (*CloudEventAttributeValue) GetCeBoolean ¶
func (x *CloudEventAttributeValue) GetCeBoolean() bool
func (*CloudEventAttributeValue) GetCeBytes ¶
func (x *CloudEventAttributeValue) GetCeBytes() []byte
func (*CloudEventAttributeValue) GetCeInteger ¶
func (x *CloudEventAttributeValue) GetCeInteger() int32
func (*CloudEventAttributeValue) GetCeString ¶
func (x *CloudEventAttributeValue) GetCeString() string
func (*CloudEventAttributeValue) GetCeTimestamp ¶
func (x *CloudEventAttributeValue) GetCeTimestamp() *timestamp.Timestamp
func (*CloudEventAttributeValue) GetCeUri ¶
func (x *CloudEventAttributeValue) GetCeUri() string
func (*CloudEventAttributeValue) GetCeUriRef ¶
func (x *CloudEventAttributeValue) GetCeUriRef() string
func (*CloudEventAttributeValue) ProtoMessage ¶
func (*CloudEventAttributeValue) ProtoMessage()
func (*CloudEventAttributeValue) ProtoReflect ¶
func (x *CloudEventAttributeValue) ProtoReflect() protoreflect.Message
func (*CloudEventAttributeValue) Reset ¶
func (x *CloudEventAttributeValue) Reset()
func (*CloudEventAttributeValue) String ¶
func (x *CloudEventAttributeValue) String() string
type CloudEventAttributeValue_CeBoolean ¶
type CloudEventAttributeValue_CeBoolean struct { // Boolean value. CeBoolean bool `protobuf:"varint,1,opt,name=ce_boolean,json=ceBoolean,proto3,oneof"` }
type CloudEventAttributeValue_CeBytes ¶
type CloudEventAttributeValue_CeBytes struct { // Byte string value. CeBytes []byte `protobuf:"bytes,4,opt,name=ce_bytes,json=ceBytes,proto3,oneof"` }
type CloudEventAttributeValue_CeInteger ¶
type CloudEventAttributeValue_CeInteger struct { // Integer value. CeInteger int32 `protobuf:"varint,2,opt,name=ce_integer,json=ceInteger,proto3,oneof"` }
type CloudEventAttributeValue_CeString ¶
type CloudEventAttributeValue_CeString struct { // String value. CeString string `protobuf:"bytes,3,opt,name=ce_string,json=ceString,proto3,oneof"` }
type CloudEventAttributeValue_CeUri ¶
type CloudEventAttributeValue_CeUri struct { // URI value. CeUri string `protobuf:"bytes,5,opt,name=ce_uri,json=ceUri,proto3,oneof"` }
type CloudEventAttributeValue_CeUriRef ¶
type CloudEventAttributeValue_CeUriRef struct { // URI reference value. CeUriRef string `protobuf:"bytes,6,opt,name=ce_uri_ref,json=ceUriRef,proto3,oneof"` }
type CloudEventServiceClient ¶
type CloudEventServiceClient interface { Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*empty.Empty, error) Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (CloudEventService_SubscribeClient, error) }
CloudEventServiceClient is the client API for CloudEventService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCloudEventServiceClient ¶
func NewCloudEventServiceClient(cc grpc.ClientConnInterface) CloudEventServiceClient
type CloudEventServiceServer ¶
type CloudEventServiceServer interface { Publish(context.Context, *PublishRequest) (*empty.Empty, error) Subscribe(*SubscriptionRequest, CloudEventService_SubscribeServer) error // contains filtered or unexported methods }
CloudEventServiceServer is the server API for CloudEventService service. All implementations must embed UnimplementedCloudEventServiceServer for forward compatibility
type CloudEventService_SubscribeClient ¶
type CloudEventService_SubscribeClient interface { Recv() (*CloudEvent, error) grpc.ClientStream }
type CloudEventService_SubscribeServer ¶
type CloudEventService_SubscribeServer interface { Send(*CloudEvent) error grpc.ServerStream }
type CloudEvent_BinaryData ¶
type CloudEvent_BinaryData struct { // If the event is binary data then the datacontenttype attribute // should be set to an appropriate media-type. BinaryData []byte `protobuf:"bytes,6,opt,name=binary_data,json=binaryData,proto3,oneof"` }
type CloudEvent_ProtoData ¶
type CloudEvent_ProtoData struct { // If the event is a protobuf then it must be encoded using this Any // type. The datacontenttype attribute should be set to // application/protobuf and the dataschema attribute set to the message // type. ProtoData *any1.Any `protobuf:"bytes,8,opt,name=proto_data,json=protoData,proto3,oneof"` }
type CloudEvent_TextData ¶
type CloudEvent_TextData struct { // If the event is string data then the datacontenttype attribute // should be set to an appropriate media-type such as application/json. TextData string `protobuf:"bytes,7,opt,name=text_data,json=textData,proto3,oneof"` }
type PublishRequest ¶
type PublishRequest struct { // Required. Define the CloudEvent to be published Event *CloudEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // contains filtered or unexported fields }
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetEvent ¶
func (x *PublishRequest) GetEvent() *CloudEvent
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type SubscriptionRequest ¶
type SubscriptionRequest struct { // Required. The original source of the respond CloudEvent(s). Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` // contains filtered or unexported fields }
func (*SubscriptionRequest) Descriptor
deprecated
func (*SubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscriptionRequest.ProtoReflect.Descriptor instead.
func (*SubscriptionRequest) GetSource ¶ added in v0.14.0
func (x *SubscriptionRequest) GetSource() string
func (*SubscriptionRequest) ProtoMessage ¶
func (*SubscriptionRequest) ProtoMessage()
func (*SubscriptionRequest) ProtoReflect ¶
func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message
func (*SubscriptionRequest) Reset ¶
func (x *SubscriptionRequest) Reset()
func (*SubscriptionRequest) String ¶
func (x *SubscriptionRequest) String() string
type UnimplementedCloudEventServiceServer ¶
type UnimplementedCloudEventServiceServer struct { }
UnimplementedCloudEventServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCloudEventServiceServer) Publish ¶
func (UnimplementedCloudEventServiceServer) Publish(context.Context, *PublishRequest) (*empty.Empty, error)
type UnsafeCloudEventServiceServer ¶
type UnsafeCloudEventServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCloudEventServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CloudEventServiceServer will result in compilation errors.