compose.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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.compose.v1;
  14. option go_package = "github.com/docker/compose-cli/cli/server/protos/compose/v1;v1";
  15. service Compose {
  16. rpc Up(ComposeUpRequest) returns (ComposeUpResponse);
  17. rpc Down(ComposeDownRequest) returns (ComposeDownResponse);
  18. rpc Stacks(ComposeStacksRequest)returns (ComposeStacksResponse);
  19. rpc Services(ComposeServicesRequest)returns (ComposeServicesResponse);
  20. }
  21. message ComposeUpRequest {
  22. string projectName = 1;
  23. string workDir = 2;
  24. repeated string files = 3;
  25. }
  26. message ComposeUpResponse {
  27. string projectName = 1;
  28. }
  29. message ComposeDownRequest {
  30. string projectName = 1;
  31. string workDir = 2;
  32. repeated string files = 3;
  33. }
  34. message ComposeDownResponse {
  35. string projectName = 1;
  36. }
  37. message ComposeStacksRequest {
  38. string projectName = 1;
  39. bool all = 2;
  40. }
  41. message ComposeStacksResponse {
  42. repeated Stack stacks = 1;
  43. }
  44. message Stack {
  45. string id = 1;
  46. string name = 2;
  47. string status = 3;
  48. string reason = 4;
  49. }
  50. message ComposeServicesRequest {
  51. string projectName = 1;
  52. string workDir = 2;
  53. repeated string files = 3;
  54. }
  55. message ComposeServicesResponse {
  56. repeated Service services = 1;
  57. }
  58. message Service {
  59. string id = 1;
  60. string name = 2;
  61. uint32 replicas = 3;
  62. uint32 desired = 4;
  63. repeated string Ports = 5;
  64. }