diff options
author | iddqd <iddqd@yandex-team.com> | 2024-06-11 10:12:13 +0300 |
---|---|---|
committer | iddqd <iddqd@yandex-team.com> | 2024-06-11 10:22:43 +0300 |
commit | 07f57e35443ab7f09471caf2dbf1afbcced4d9f7 (patch) | |
tree | a4a7b66ead62e83fa988a2ec2ce6576311c1f4b1 /contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1 | |
parent | 6db3b8ca95e44179e48306a58656fb1f9317d9c3 (diff) | |
download | ydb-07f57e35443ab7f09471caf2dbf1afbcced4d9f7.tar.gz |
add contrib/python/yandexcloud to import
03b7d3cad2237366b55b393e18d4dc5eb222798c
Diffstat (limited to 'contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1')
2 files changed, 91 insertions, 0 deletions
diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1/connection.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1/connection.proto new file mode 100644 index 0000000000..f5c99234e8 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1/connection.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package yandex.cloud.serverless.apigateway.websocket.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/serverless/apigateway/websocket/v1;websocket"; +option java_package = "yandex.cloud.api.serverless.apigateway.websocket.v1"; + +message Connection { + // ID of the connection. + string id = 1; + // ID of the API Gateway. + string gateway_id = 2; + // The information about the caller making the request to API Gateway. + Identity identity = 3; + // The timestamp at which connection was established. + google.protobuf.Timestamp connected_at = 4; + // The timestamp at which connection was last accessed. + google.protobuf.Timestamp last_active_at = 5; +} + +message Identity { + // The source IP address of the caller making the request to API Gateway. + string source_ip = 1; + // The User Agent of the caller making the request to API Gateway. + string user_agent = 2; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1/connection_service.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1/connection_service.proto new file mode 100644 index 0000000000..d9a9c6bb84 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/apigateway/websocket/v1/connection_service.proto @@ -0,0 +1,63 @@ +syntax = "proto3"; + +package yandex.cloud.serverless.apigateway.websocket.v1; + +import "google/api/annotations.proto"; +import "yandex/cloud/validation.proto"; +import "yandex/cloud/serverless/apigateway/websocket/v1/connection.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/serverless/apigateway/websocket/v1;websocket"; +option java_package = "yandex.cloud.api.serverless.apigateway.websocket.v1"; + +// A set of methods for managing API Gateway WebSocket connections. +service ConnectionService { + // Returns the specified connection info. + rpc Get (GetConnectionRequest) returns (Connection){ + option (google.api.http) = {get: "/apigateways/websocket/v1/connections/{connection_id}"}; + } + + // Sends data to the specified connection. + rpc Send(SendToConnectionRequest) returns (SendToConnectionResponse){ + option (google.api.http) = {post: "/apigateways/websocket/v1/connections/{connection_id}:send" body: "*"}; + } + + // Disconnects the specified connection. + rpc Disconnect(DisconnectRequest) returns (DisconnectResponse){ + option (google.api.http) = {delete: "/apigateways/websocket/v1/connections/{connection_id}"}; + } +} + +message GetConnectionRequest { + // ID of the connection to get. + string connection_id = 1 [(required) = true, (length) = "<=50"]; +} + +message SendToConnectionRequest { + enum DataType { + DATA_TYPE_UNSPECIFIED = 0; + + // Binary data. + BINARY = 1; + + // Text data. + TEXT = 2; + } + + // ID of the connection to which send. + string connection_id = 1 [(required) = true, (length) = "<=50"]; + + // Data to send. + bytes data = 2 [(required) = true, (length) = "<=131072"]; + + // Type of the sending data. + DataType type = 3; +} + +message SendToConnectionResponse {} + +message DisconnectRequest { + // ID of the connection to disconnect. + string connection_id = 1 [(required) = true, (length) = "<=50"]; +} + +message DisconnectResponse {} |