Constants
Publisher_PublishChannelConnectionEvents_FullMethodName, Publisher_PublishEvents_FullMethodName, Publisher_Publish_FullMethodName
const (
Publisher_PublishChannelConnectionEvents_FullMethodName = "/google.cloud.eventarc.publishing.v1.Publisher/PublishChannelConnectionEvents"
Publisher_PublishEvents_FullMethodName = "/google.cloud.eventarc.publishing.v1.Publisher/PublishEvents"
Publisher_Publish_FullMethodName = "/google.cloud.eventarc.publishing.v1.Publisher/Publish"
)Variables
File_google_cloud_eventarc_publishing_v1_cloud_event_proto
var File_google_cloud_eventarc_publishing_v1_cloud_event_proto protoreflect.FileDescriptorFile_google_cloud_eventarc_publishing_v1_publisher_proto
var File_google_cloud_eventarc_publishing_v1_publisher_proto protoreflect.FileDescriptorPublisher_ServiceDesc
var Publisher_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.eventarc.publishing.v1.Publisher",
HandlerType: (*PublisherServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PublishChannelConnectionEvents",
Handler: _Publisher_PublishChannelConnectionEvents_Handler,
},
{
MethodName: "PublishEvents",
Handler: _Publisher_PublishEvents_Handler,
},
{
MethodName: "Publish",
Handler: _Publisher_Publish_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/eventarc/publishing/v1/publisher.proto",
}Publisher_ServiceDesc is the grpc.ServiceDesc for Publisher service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions
func RegisterPublisherServer
func RegisterPublisherServer(s grpc.ServiceRegistrar, srv PublisherServer)CloudEvent
type CloudEvent struct {
// Required. Identifies the event. Producers MUST ensure that source + id is
// unique for each distinct event.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Required. Identifies the context in which an event happened.
// URI-reference
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
// Required. The version of the CloudEvents specification which the event
// uses.
SpecVersion string `protobuf:"bytes,3,opt,name=spec_version,json=specVersion,proto3" json:"spec_version,omitempty"`
// Required. This attribute contains a value describing the type of event
// related to the originating occurrence.
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
// Optional. Used for Optional & Extension Attributes
Attributes map[string]*CloudEvent_CloudEventAttributeValue `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The event payload. It should be encoded into a media format which is
// specified by the 'datacontenttype' attribute (e.g. application/json), and
// adheres to the dataschema format when those respective attributes are
// present.
//
// Types that are assignable to Data:
//
// *CloudEvent_BinaryData
// *CloudEvent_TextData
// *CloudEvent_ProtoData
Data isCloudEvent_Data `protobuf_oneof:"data"`
// contains filtered or unexported fields
}CloudEvent represents a vendor-neutral specification for defining the format of event data.
func (*CloudEvent) Descriptor
func (*CloudEvent) Descriptor() ([]byte, []int)Deprecated: Use CloudEvent.ProtoReflect.Descriptor instead.
func (*CloudEvent) GetAttributes
func (x *CloudEvent) GetAttributes() map[string]*CloudEvent_CloudEventAttributeValuefunc (*CloudEvent) GetBinaryData
func (x *CloudEvent) GetBinaryData() []bytefunc (*CloudEvent) GetData
func (m *CloudEvent) GetData() isCloudEvent_Datafunc (*CloudEvent) GetId
func (x *CloudEvent) GetId() stringfunc (*CloudEvent) GetProtoData
func (x *CloudEvent) GetProtoData() *anypb.Anyfunc (*CloudEvent) GetSource
func (x *CloudEvent) GetSource() stringfunc (*CloudEvent) GetSpecVersion
func (x *CloudEvent) GetSpecVersion() stringfunc (*CloudEvent) GetTextData
func (x *CloudEvent) GetTextData() stringfunc (*CloudEvent) GetType
func (x *CloudEvent) GetType() stringfunc (*CloudEvent) ProtoMessage
func (*CloudEvent) ProtoMessage()func (*CloudEvent) ProtoReflect
func (x *CloudEvent) ProtoReflect() protoreflect.Messagefunc (*CloudEvent) Reset
func (x *CloudEvent) Reset()func (*CloudEvent) String
func (x *CloudEvent) String() stringCloudEvent_BinaryData
type CloudEvent_BinaryData struct {
// Optional. Binary data.
BinaryData []byte `protobuf:"bytes,6,opt,name=binary_data,json=binaryData,proto3,oneof"`
}CloudEvent_CloudEventAttributeValue
type CloudEvent_CloudEventAttributeValue struct {
// The value of the attribute.
//
// Types that are assignable to Attr:
//
// *CloudEvent_CloudEventAttributeValue_CeBoolean
// *CloudEvent_CloudEventAttributeValue_CeInteger
// *CloudEvent_CloudEventAttributeValue_CeString
// *CloudEvent_CloudEventAttributeValue_CeBytes
// *CloudEvent_CloudEventAttributeValue_CeUri
// *CloudEvent_CloudEventAttributeValue_CeUriRef
// *CloudEvent_CloudEventAttributeValue_CeTimestamp
Attr isCloudEvent_CloudEventAttributeValue_Attr `protobuf_oneof:"attr"`
// contains filtered or unexported fields
}The following abstract data types are available for use in attributes.
func (*CloudEvent_CloudEventAttributeValue) Descriptor
func (*CloudEvent_CloudEventAttributeValue) Descriptor() ([]byte, []int)Deprecated: Use CloudEvent_CloudEventAttributeValue.ProtoReflect.Descriptor instead.
func (*CloudEvent_CloudEventAttributeValue) GetAttr
func (m *CloudEvent_CloudEventAttributeValue) GetAttr() isCloudEvent_CloudEventAttributeValue_Attrfunc (*CloudEvent_CloudEventAttributeValue) GetCeBoolean
func (x *CloudEvent_CloudEventAttributeValue) GetCeBoolean() boolfunc (*CloudEvent_CloudEventAttributeValue) GetCeBytes
func (x *CloudEvent_CloudEventAttributeValue) GetCeBytes() []bytefunc (*CloudEvent_CloudEventAttributeValue) GetCeInteger
func (x *CloudEvent_CloudEventAttributeValue) GetCeInteger() int32func (*CloudEvent_CloudEventAttributeValue) GetCeString
func (x *CloudEvent_CloudEventAttributeValue) GetCeString() stringfunc (*CloudEvent_CloudEventAttributeValue) GetCeTimestamp
func (x *CloudEvent_CloudEventAttributeValue) GetCeTimestamp() *timestamppb.Timestampfunc (*CloudEvent_CloudEventAttributeValue) GetCeUri
func (x *CloudEvent_CloudEventAttributeValue) GetCeUri() stringfunc (*CloudEvent_CloudEventAttributeValue) GetCeUriRef
func (x *CloudEvent_CloudEventAttributeValue) GetCeUriRef() stringfunc (*CloudEvent_CloudEventAttributeValue) ProtoMessage
func (*CloudEvent_CloudEventAttributeValue) ProtoMessage()func (*CloudEvent_CloudEventAttributeValue) ProtoReflect
func (x *CloudEvent_CloudEventAttributeValue) ProtoReflect() protoreflect.Messagefunc (*CloudEvent_CloudEventAttributeValue) Reset
func (x *CloudEvent_CloudEventAttributeValue) Reset()func (*CloudEvent_CloudEventAttributeValue) String
func (x *CloudEvent_CloudEventAttributeValue) String() stringCloudEvent_CloudEventAttributeValue_CeBoolean
type CloudEvent_CloudEventAttributeValue_CeBoolean struct {
// Boolean value.
CeBoolean bool `protobuf:"varint,1,opt,name=ce_boolean,json=ceBoolean,proto3,oneof"`
}CloudEvent_CloudEventAttributeValue_CeBytes
type CloudEvent_CloudEventAttributeValue_CeBytes struct {
// Bytes value.
CeBytes []byte `protobuf:"bytes,4,opt,name=ce_bytes,json=ceBytes,proto3,oneof"`
}CloudEvent_CloudEventAttributeValue_CeInteger
type CloudEvent_CloudEventAttributeValue_CeInteger struct {
// Integer value.
CeInteger int32 `protobuf:"varint,2,opt,name=ce_integer,json=ceInteger,proto3,oneof"`
}CloudEvent_CloudEventAttributeValue_CeString
type CloudEvent_CloudEventAttributeValue_CeString struct {
// String value.
CeString string `protobuf:"bytes,3,opt,name=ce_string,json=ceString,proto3,oneof"`
}CloudEvent_CloudEventAttributeValue_CeTimestamp
type CloudEvent_CloudEventAttributeValue_CeTimestamp struct {
// Timestamp value.
CeTimestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=ce_timestamp,json=ceTimestamp,proto3,oneof"`
}CloudEvent_CloudEventAttributeValue_CeUri
type CloudEvent_CloudEventAttributeValue_CeUri struct {
// URI value.
CeUri string `protobuf:"bytes,5,opt,name=ce_uri,json=ceUri,proto3,oneof"`
}CloudEvent_CloudEventAttributeValue_CeUriRef
type CloudEvent_CloudEventAttributeValue_CeUriRef struct {
// URI-reference value.
CeUriRef string `protobuf:"bytes,6,opt,name=ce_uri_ref,json=ceUriRef,proto3,oneof"`
}CloudEvent_ProtoData
type CloudEvent_ProtoData struct {
// Optional. Proto data.
//
// NOTE: The `protoData` field only functions as expected when the payload
// is specifically a `CloudEvent` message type, and can't be used for
// arbitrary protocol buffer messages. For any other protocol buffer type,
// you must serialize your proto message into bytes, and use the
// `binaryData` field instead.
ProtoData *anypb.Any `protobuf:"bytes,8,opt,name=proto_data,json=protoData,proto3,oneof"`
}CloudEvent_TextData
type CloudEvent_TextData struct {
// Optional. Text data.
TextData string `protobuf:"bytes,7,opt,name=text_data,json=textData,proto3,oneof"`
}PublishChannelConnectionEventsRequest
type PublishChannelConnectionEventsRequest struct {
// The channel_connection that the events are published from. For example:
// `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
ChannelConnection string `protobuf:"bytes,1,opt,name=channel_connection,json=channelConnection,proto3" json:"channel_connection,omitempty"`
// The CloudEvents v1.0 events to publish. No other types are allowed.
// If this field is set, then the `text_events` fields must not be set.
Events []*anypb.Any `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
// The text representation of events to publish.
// CloudEvent v1.0 in JSON format is the only allowed type. Refer to
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
// for specification.
// If this field is set, then the `events` fields must not be set.
TextEvents []string `protobuf:"bytes,3,rep,name=text_events,json=textEvents,proto3" json:"text_events,omitempty"`
// contains filtered or unexported fields
}The request message for the PublishChannelConnectionEvents method.
func (*PublishChannelConnectionEventsRequest) Descriptor
func (*PublishChannelConnectionEventsRequest) Descriptor() ([]byte, []int)Deprecated: Use PublishChannelConnectionEventsRequest.ProtoReflect.Descriptor instead.
func (*PublishChannelConnectionEventsRequest) GetChannelConnection
func (x *PublishChannelConnectionEventsRequest) GetChannelConnection() stringfunc (*PublishChannelConnectionEventsRequest) GetEvents
func (x *PublishChannelConnectionEventsRequest) GetEvents() []*anypb.Anyfunc (*PublishChannelConnectionEventsRequest) GetTextEvents
func (x *PublishChannelConnectionEventsRequest) GetTextEvents() []stringfunc (*PublishChannelConnectionEventsRequest) ProtoMessage
func (*PublishChannelConnectionEventsRequest) ProtoMessage()func (*PublishChannelConnectionEventsRequest) ProtoReflect
func (x *PublishChannelConnectionEventsRequest) ProtoReflect() protoreflect.Messagefunc (*PublishChannelConnectionEventsRequest) Reset
func (x *PublishChannelConnectionEventsRequest) Reset()func (*PublishChannelConnectionEventsRequest) String
func (x *PublishChannelConnectionEventsRequest) String() stringPublishChannelConnectionEventsResponse
type PublishChannelConnectionEventsResponse struct {
// contains filtered or unexported fields
}The response message for the PublishChannelConnectionEvents method.
func (*PublishChannelConnectionEventsResponse) Descriptor
func (*PublishChannelConnectionEventsResponse) Descriptor() ([]byte, []int)Deprecated: Use PublishChannelConnectionEventsResponse.ProtoReflect.Descriptor instead.
func (*PublishChannelConnectionEventsResponse) ProtoMessage
func (*PublishChannelConnectionEventsResponse) ProtoMessage()func (*PublishChannelConnectionEventsResponse) ProtoReflect
func (x *PublishChannelConnectionEventsResponse) ProtoReflect() protoreflect.Messagefunc (*PublishChannelConnectionEventsResponse) Reset
func (x *PublishChannelConnectionEventsResponse) Reset()func (*PublishChannelConnectionEventsResponse) String
func (x *PublishChannelConnectionEventsResponse) String() stringPublishEventsRequest
type PublishEventsRequest struct {
// The full name of the channel to publish to. For example:
// `projects/{project}/locations/{location}/channels/{channel-id}`.
Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
// The CloudEvents v1.0 events to publish. No other types are allowed.
// If this field is set, then the `text_events` fields must not be set.
Events []*anypb.Any `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
// The text representation of events to publish.
// CloudEvent v1.0 in JSON format is the only allowed type. Refer to
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
// for specification.
// If this field is set, then the `events` fields must not be set.
TextEvents []string `protobuf:"bytes,3,rep,name=text_events,json=textEvents,proto3" json:"text_events,omitempty"`
// contains filtered or unexported fields
}The request message for the PublishEvents method.
func (*PublishEventsRequest) Descriptor
func (*PublishEventsRequest) Descriptor() ([]byte, []int)Deprecated: Use PublishEventsRequest.ProtoReflect.Descriptor instead.
func (*PublishEventsRequest) GetChannel
func (x *PublishEventsRequest) GetChannel() stringfunc (*PublishEventsRequest) GetEvents
func (x *PublishEventsRequest) GetEvents() []*anypb.Anyfunc (*PublishEventsRequest) GetTextEvents
func (x *PublishEventsRequest) GetTextEvents() []stringfunc (*PublishEventsRequest) ProtoMessage
func (*PublishEventsRequest) ProtoMessage()func (*PublishEventsRequest) ProtoReflect
func (x *PublishEventsRequest) ProtoReflect() protoreflect.Messagefunc (*PublishEventsRequest) Reset
func (x *PublishEventsRequest) Reset()func (*PublishEventsRequest) String
func (x *PublishEventsRequest) String() stringPublishEventsResponse
type PublishEventsResponse struct {
// contains filtered or unexported fields
}The response message for the PublishEvents method.
func (*PublishEventsResponse) Descriptor
func (*PublishEventsResponse) Descriptor() ([]byte, []int)Deprecated: Use PublishEventsResponse.ProtoReflect.Descriptor instead.
func (*PublishEventsResponse) ProtoMessage
func (*PublishEventsResponse) ProtoMessage()func (*PublishEventsResponse) ProtoReflect
func (x *PublishEventsResponse) ProtoReflect() protoreflect.Messagefunc (*PublishEventsResponse) Reset
func (x *PublishEventsResponse) Reset()func (*PublishEventsResponse) String
func (x *PublishEventsResponse) String() stringPublishRequest
type PublishRequest struct {
// Required. The full name of the message bus to publish events to. Format:
// `projects/{project}/locations/{location}/messageBuses/{messageBus}`.
MessageBus string `protobuf:"bytes,1,opt,name=message_bus,json=messageBus,proto3" json:"message_bus,omitempty"`
// Types that are assignable to Format:
//
// *PublishRequest_ProtoMessage_
// *PublishRequest_JsonMessage
// *PublishRequest_AvroMessage
Format isPublishRequest_Format `protobuf_oneof:"format"`
// contains filtered or unexported fields
}The request message for the Publish method.
func (*PublishRequest) Descriptor
func (*PublishRequest) Descriptor() ([]byte, []int)Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetAvroMessage
func (x *PublishRequest) GetAvroMessage() []bytefunc (*PublishRequest) GetFormat
func (m *PublishRequest) GetFormat() isPublishRequest_Formatfunc (*PublishRequest) GetJsonMessage
func (x *PublishRequest) GetJsonMessage() stringfunc (*PublishRequest) GetMessageBus
func (x *PublishRequest) GetMessageBus() stringfunc (*PublishRequest) GetProtoMessage_
func (x *PublishRequest) GetProtoMessage_() *CloudEventfunc (*PublishRequest) ProtoMessage
func (*PublishRequest) ProtoMessage()func (*PublishRequest) ProtoReflect
func (x *PublishRequest) ProtoReflect() protoreflect.Messagefunc (*PublishRequest) Reset
func (x *PublishRequest) Reset()func (*PublishRequest) String
func (x *PublishRequest) String() stringPublishRequest_AvroMessage
type PublishRequest_AvroMessage struct {
// The Avro format of the CloudEvent being published. Specification can
// be found here:
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md
AvroMessage []byte `protobuf:"bytes,4,opt,name=avro_message,json=avroMessage,proto3,oneof"`
}PublishRequest_JsonMessage
type PublishRequest_JsonMessage struct {
// The JSON format of the CloudEvent being published. Specification can be
// found here:
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
JsonMessage string `protobuf:"bytes,3,opt,name=json_message,json=jsonMessage,proto3,oneof"`
}PublishRequest_ProtoMessage_
type PublishRequest_ProtoMessage_ struct {
// The Protobuf format of the CloudEvent being published. Specification can
// be found here:
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md
ProtoMessage_ *CloudEvent `protobuf:"bytes,2,opt,name=proto_message,json=protoMessage,proto3,oneof"`
}PublishResponse
type PublishResponse struct {
// contains filtered or unexported fields
}The response message for the Publish method.
func (*PublishResponse) Descriptor
func (*PublishResponse) Descriptor() ([]byte, []int)Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.
func (*PublishResponse) ProtoMessage
func (*PublishResponse) ProtoMessage()func (*PublishResponse) ProtoReflect
func (x *PublishResponse) ProtoReflect() protoreflect.Messagefunc (*PublishResponse) Reset
func (x *PublishResponse) Reset()func (*PublishResponse) String
func (x *PublishResponse) String() stringPublisherClient
type PublisherClient interface {
// Publish events to a ChannelConnection in a partner's project.
PublishChannelConnectionEvents(ctx context.Context, in *PublishChannelConnectionEventsRequest, opts ...grpc.CallOption) (*PublishChannelConnectionEventsResponse, error)
// Publish events to a subscriber's channel.
PublishEvents(ctx context.Context, in *PublishEventsRequest, opts ...grpc.CallOption) (*PublishEventsResponse, error)
// Publish events to a message bus.
Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error)
}PublisherClient is the client API for Publisher 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 NewPublisherClient
func NewPublisherClient(cc grpc.ClientConnInterface) PublisherClientPublisherServer
type PublisherServer interface {
// Publish events to a ChannelConnection in a partner's project.
PublishChannelConnectionEvents(context.Context, *PublishChannelConnectionEventsRequest) (*PublishChannelConnectionEventsResponse, error)
// Publish events to a subscriber's channel.
PublishEvents(context.Context, *PublishEventsRequest) (*PublishEventsResponse, error)
// Publish events to a message bus.
Publish(context.Context, *PublishRequest) (*PublishResponse, error)
}PublisherServer is the server API for Publisher service. All implementations should embed UnimplementedPublisherServer for forward compatibility
UnimplementedPublisherServer
type UnimplementedPublisherServer struct {
}UnimplementedPublisherServer should be embedded to have forward compatible implementations.
func (UnimplementedPublisherServer) Publish
func (UnimplementedPublisherServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error)func (UnimplementedPublisherServer) PublishChannelConnectionEvents
func (UnimplementedPublisherServer) PublishChannelConnectionEvents(context.Context, *PublishChannelConnectionEventsRequest) (*PublishChannelConnectionEventsResponse, error)func (UnimplementedPublisherServer) PublishEvents
func (UnimplementedPublisherServer) PublishEvents(context.Context, *PublishEventsRequest) (*PublishEventsResponse, error)UnsafePublisherServer
type UnsafePublisherServer interface {
// contains filtered or unexported methods
}UnsafePublisherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PublisherServer will result in compilation errors.