contexts.proto 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // Copyright 2020 Docker Compose CLI authors
  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. // http://www.apache.org/licenses/LICENSE-2.0
  7. // Unless required by applicable law or agreed to in writing, software
  8. // distributed under the License is distributed on an "AS IS" BASIS,
  9. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. // See the License for the specific language governing permissions and
  11. // limitations under the License.
  12. syntax = "proto3";
  13. package com.docker.api.protos.context.v1;
  14. option go_package = "github.com/docker/compose-cli/cli/server/protos/context/v1;v1";
  15. service Contexts {
  16. // Sets the current request for all calls
  17. rpc SetCurrent(SetCurrentRequest) returns (SetCurrentResponse);
  18. // Returns the list of existing contexts
  19. rpc List(ListRequest) returns (ListResponse);
  20. }
  21. message Context {
  22. string name = 1;
  23. string contextType = 2;
  24. bool current = 3;
  25. string description = 4;
  26. oneof Endpoint {
  27. DockerEndpoint docker_endpoint = 5;
  28. AciEndpoint aci_endpoint = 6;
  29. EcsEndpoint ecs_endpoint = 7;
  30. }
  31. }
  32. message DockerEndpoint {
  33. string host = 1;
  34. }
  35. message AciEndpoint {
  36. string region = 1;
  37. string resource_group = 2;
  38. string subscription_id = 3;
  39. }
  40. message EcsEndpoint {
  41. string profile = 1;
  42. bool from_environment = 2;
  43. }
  44. message SetCurrentRequest {
  45. string name = 1;
  46. }
  47. message SetCurrentResponse {
  48. }
  49. message ListRequest {
  50. }
  51. message ListResponse {
  52. repeated Context contexts = 1;
  53. }