compose.proto 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. }
  40. message ComposeStacksResponse {
  41. repeated Stack stacks = 1;
  42. }
  43. message Stack {
  44. string id = 1;
  45. string name = 2;
  46. string status = 3;
  47. string reason = 4;
  48. }
  49. message ComposeServicesRequest {
  50. string projectName = 1;
  51. string workDir = 2;
  52. repeated string files = 3;
  53. }
  54. message ComposeServicesResponse {
  55. repeated Service services = 1;
  56. }
  57. message Service {
  58. string id = 1;
  59. string name = 2;
  60. uint32 replicas = 3;
  61. uint32 desired = 4;
  62. repeated string Ports = 5;
  63. }