Skip to content

Commit

Permalink
feat: Add publishing methods for channel resources
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 442858558
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 19, 2022
1 parent 0d5e4e2 commit 726dac2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ authentication:
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.eventarc.publishing.v1.Publisher.PublishEvents
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
31 changes: 27 additions & 4 deletions google/cloud/eventarc/publishing/v1/publisher.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,14 +17,14 @@ syntax = "proto3";
package google.cloud.eventarc.publishing.v1;

import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/api/client.proto";
import "google/protobuf/any.proto";

option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/eventarc/publishing/v1;publisher";
option java_multiple_files = true;
option java_outer_classname = "PublisherProto";
option java_package = "com.google.cloud.eventarc.publishing.v1";
option go_package = "google.golang.org/genproto/googleapis/cloud/eventarc/publishing/v1;publisher";
option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1";
option php_namespace = "Google\\Cloud\\Eventarc\\Publishing\\V1";
option ruby_package = "Google::Cloud::Eventarc::Publishing::V1";

Expand Down Expand Up @@ -63,6 +63,14 @@ service Publisher {
body: "*"
};
}

// Publish events to a subscriber's channel.
rpc PublishEvents(PublishEventsRequest) returns (PublishEventsResponse) {
option (google.api.http) = {
post: "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents"
body: "*"
};
}
}

// The request message for the PublishChannelConnectionEvents method.
Expand All @@ -79,3 +87,18 @@ message PublishChannelConnectionEventsRequest {
message PublishChannelConnectionEventsResponse {

}

// The request message for the PublishEvents method.
message PublishEventsRequest {
// The full name of the channel to publish to. For example:
// `projects/{project}/locations/{location}/channels/{channel-id}`.
string channel = 1;

// The CloudEvents v1.0 events to publish. No other types are allowed.
repeated google.protobuf.Any events = 2;
}

// The response message for the PublishEvents method.
message PublishEventsResponse {

}

0 comments on commit 726dac2

Please sign in to comment.