gateway.proto 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.gkeconnect.gateway.v1beta1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/httpbody.proto";
  19. option csharp_namespace = "Google.Cloud.GkeConnect.Gateway.V1Beta1";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/gkeconnect/gateway/v1beta1;gateway";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "GatewayProto";
  23. option java_package = "com.google.cloud.gkeconnect.gateway.v1beta1";
  24. option php_namespace = "Google\\Cloud\\GkeConnect\\Gateway\\V1beta1";
  25. option ruby_package = "Google::Cloud::GkeConnect::Gateway::V1beta1";
  26. // Gateway service is a public API which works as a Kubernetes resource model
  27. // proxy between end users and registered Kubernetes clusters. Each RPC in this
  28. // service matches with an HTTP verb. End user will initiate kubectl commands
  29. // against the Gateway service, and Gateway service will forward user requests
  30. // to clusters.
  31. service GatewayService {
  32. option (google.api.default_host) = "connectgateway.googleapis.com";
  33. option (google.api.oauth_scopes) =
  34. "https://www.googleapis.com/auth/cloud-platform";
  35. // GetResource performs an HTTP GET request on the Kubernetes API Server.
  36. rpc GetResource(google.api.HttpBody) returns (google.api.HttpBody) {
  37. option (google.api.http) = {
  38. get: "/v1beta1/**"
  39. };
  40. }
  41. // PostResource performs an HTTP POST on the Kubernetes API Server.
  42. rpc PostResource(google.api.HttpBody) returns (google.api.HttpBody) {
  43. option (google.api.http) = {
  44. post: "/v1beta1/**"
  45. };
  46. }
  47. // DeleteResource performs an HTTP DELETE on the Kubernetes API Server.
  48. rpc DeleteResource(google.api.HttpBody) returns (google.api.HttpBody) {
  49. option (google.api.http) = {
  50. delete: "/v1beta1/**"
  51. };
  52. }
  53. // PutResource performs an HTTP PUT on the Kubernetes API Server.
  54. rpc PutResource(google.api.HttpBody) returns (google.api.HttpBody) {
  55. option (google.api.http) = {
  56. put: "/v1beta1/**"
  57. };
  58. }
  59. // PatchResource performs an HTTP PATCH on the Kubernetes API Server.
  60. rpc PatchResource(google.api.HttpBody) returns (google.api.HttpBody) {
  61. option (google.api.http) = {
  62. patch: "/v1beta1/**"
  63. };
  64. }
  65. }