contexts.proto 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // Copyright 2020 Docker, Inc.
  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/api/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. }
  26. message SetCurrentRequest {
  27. string name = 1;
  28. }
  29. message SetCurrentResponse {
  30. }
  31. message ListRequest {
  32. }
  33. message ListResponse {
  34. repeated Context contexts = 1;
  35. }