1
0

contexts.pb.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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. // Code generated by protoc-gen-go. DO NOT EDIT.
  13. // versions:
  14. // protoc-gen-go v1.24.0
  15. // protoc v3.11.2
  16. // source: protos/contexts/v1/contexts.proto
  17. package v1
  18. import (
  19. context "context"
  20. proto "github.com/golang/protobuf/proto"
  21. grpc "google.golang.org/grpc"
  22. codes "google.golang.org/grpc/codes"
  23. status "google.golang.org/grpc/status"
  24. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  25. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  26. reflect "reflect"
  27. sync "sync"
  28. )
  29. const (
  30. // Verify that this generated code is sufficiently up-to-date.
  31. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  32. // Verify that runtime/protoimpl is sufficiently up-to-date.
  33. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  34. )
  35. // This is a compile-time assertion that a sufficiently up-to-date version
  36. // of the legacy proto package is being used.
  37. const _ = proto.ProtoPackageIsVersion4
  38. type Context struct {
  39. state protoimpl.MessageState
  40. sizeCache protoimpl.SizeCache
  41. unknownFields protoimpl.UnknownFields
  42. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  43. ContextType string `protobuf:"bytes,2,opt,name=contextType,proto3" json:"contextType,omitempty"`
  44. Current bool `protobuf:"varint,3,opt,name=current,proto3" json:"current,omitempty"`
  45. }
  46. func (x *Context) Reset() {
  47. *x = Context{}
  48. if protoimpl.UnsafeEnabled {
  49. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[0]
  50. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  51. ms.StoreMessageInfo(mi)
  52. }
  53. }
  54. func (x *Context) String() string {
  55. return protoimpl.X.MessageStringOf(x)
  56. }
  57. func (*Context) ProtoMessage() {}
  58. func (x *Context) ProtoReflect() protoreflect.Message {
  59. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[0]
  60. if protoimpl.UnsafeEnabled && x != nil {
  61. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  62. if ms.LoadMessageInfo() == nil {
  63. ms.StoreMessageInfo(mi)
  64. }
  65. return ms
  66. }
  67. return mi.MessageOf(x)
  68. }
  69. // Deprecated: Use Context.ProtoReflect.Descriptor instead.
  70. func (*Context) Descriptor() ([]byte, []int) {
  71. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{0}
  72. }
  73. func (x *Context) GetName() string {
  74. if x != nil {
  75. return x.Name
  76. }
  77. return ""
  78. }
  79. func (x *Context) GetContextType() string {
  80. if x != nil {
  81. return x.ContextType
  82. }
  83. return ""
  84. }
  85. func (x *Context) GetCurrent() bool {
  86. if x != nil {
  87. return x.Current
  88. }
  89. return false
  90. }
  91. type SetCurrentRequest struct {
  92. state protoimpl.MessageState
  93. sizeCache protoimpl.SizeCache
  94. unknownFields protoimpl.UnknownFields
  95. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  96. }
  97. func (x *SetCurrentRequest) Reset() {
  98. *x = SetCurrentRequest{}
  99. if protoimpl.UnsafeEnabled {
  100. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[1]
  101. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  102. ms.StoreMessageInfo(mi)
  103. }
  104. }
  105. func (x *SetCurrentRequest) String() string {
  106. return protoimpl.X.MessageStringOf(x)
  107. }
  108. func (*SetCurrentRequest) ProtoMessage() {}
  109. func (x *SetCurrentRequest) ProtoReflect() protoreflect.Message {
  110. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[1]
  111. if protoimpl.UnsafeEnabled && x != nil {
  112. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  113. if ms.LoadMessageInfo() == nil {
  114. ms.StoreMessageInfo(mi)
  115. }
  116. return ms
  117. }
  118. return mi.MessageOf(x)
  119. }
  120. // Deprecated: Use SetCurrentRequest.ProtoReflect.Descriptor instead.
  121. func (*SetCurrentRequest) Descriptor() ([]byte, []int) {
  122. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{1}
  123. }
  124. func (x *SetCurrentRequest) GetName() string {
  125. if x != nil {
  126. return x.Name
  127. }
  128. return ""
  129. }
  130. type SetCurrentResponse struct {
  131. state protoimpl.MessageState
  132. sizeCache protoimpl.SizeCache
  133. unknownFields protoimpl.UnknownFields
  134. }
  135. func (x *SetCurrentResponse) Reset() {
  136. *x = SetCurrentResponse{}
  137. if protoimpl.UnsafeEnabled {
  138. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[2]
  139. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  140. ms.StoreMessageInfo(mi)
  141. }
  142. }
  143. func (x *SetCurrentResponse) String() string {
  144. return protoimpl.X.MessageStringOf(x)
  145. }
  146. func (*SetCurrentResponse) ProtoMessage() {}
  147. func (x *SetCurrentResponse) ProtoReflect() protoreflect.Message {
  148. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[2]
  149. if protoimpl.UnsafeEnabled && x != nil {
  150. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  151. if ms.LoadMessageInfo() == nil {
  152. ms.StoreMessageInfo(mi)
  153. }
  154. return ms
  155. }
  156. return mi.MessageOf(x)
  157. }
  158. // Deprecated: Use SetCurrentResponse.ProtoReflect.Descriptor instead.
  159. func (*SetCurrentResponse) Descriptor() ([]byte, []int) {
  160. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{2}
  161. }
  162. type ListRequest struct {
  163. state protoimpl.MessageState
  164. sizeCache protoimpl.SizeCache
  165. unknownFields protoimpl.UnknownFields
  166. }
  167. func (x *ListRequest) Reset() {
  168. *x = ListRequest{}
  169. if protoimpl.UnsafeEnabled {
  170. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[3]
  171. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  172. ms.StoreMessageInfo(mi)
  173. }
  174. }
  175. func (x *ListRequest) String() string {
  176. return protoimpl.X.MessageStringOf(x)
  177. }
  178. func (*ListRequest) ProtoMessage() {}
  179. func (x *ListRequest) ProtoReflect() protoreflect.Message {
  180. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[3]
  181. if protoimpl.UnsafeEnabled && x != nil {
  182. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  183. if ms.LoadMessageInfo() == nil {
  184. ms.StoreMessageInfo(mi)
  185. }
  186. return ms
  187. }
  188. return mi.MessageOf(x)
  189. }
  190. // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
  191. func (*ListRequest) Descriptor() ([]byte, []int) {
  192. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{3}
  193. }
  194. type ListResponse struct {
  195. state protoimpl.MessageState
  196. sizeCache protoimpl.SizeCache
  197. unknownFields protoimpl.UnknownFields
  198. Contexts []*Context `protobuf:"bytes,1,rep,name=contexts,proto3" json:"contexts,omitempty"`
  199. }
  200. func (x *ListResponse) Reset() {
  201. *x = ListResponse{}
  202. if protoimpl.UnsafeEnabled {
  203. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[4]
  204. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  205. ms.StoreMessageInfo(mi)
  206. }
  207. }
  208. func (x *ListResponse) String() string {
  209. return protoimpl.X.MessageStringOf(x)
  210. }
  211. func (*ListResponse) ProtoMessage() {}
  212. func (x *ListResponse) ProtoReflect() protoreflect.Message {
  213. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[4]
  214. if protoimpl.UnsafeEnabled && x != nil {
  215. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  216. if ms.LoadMessageInfo() == nil {
  217. ms.StoreMessageInfo(mi)
  218. }
  219. return ms
  220. }
  221. return mi.MessageOf(x)
  222. }
  223. // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
  224. func (*ListResponse) Descriptor() ([]byte, []int) {
  225. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{4}
  226. }
  227. func (x *ListResponse) GetContexts() []*Context {
  228. if x != nil {
  229. return x.Contexts
  230. }
  231. return nil
  232. }
  233. var File_protos_contexts_v1_contexts_proto protoreflect.FileDescriptor
  234. var file_protos_contexts_v1_contexts_proto_rawDesc = []byte{
  235. 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  236. 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x2e, 0x70, 0x72,
  237. 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e,
  238. 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65,
  239. 0x78, 0x74, 0x2e, 0x76, 0x31, 0x22, 0x59, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  240. 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
  241. 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54,
  242. 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65,
  243. 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
  244. 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
  245. 0x22, 0x27, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65,
  246. 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
  247. 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x53, 0x65, 0x74,
  248. 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
  249. 0x0d, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55,
  250. 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45,
  251. 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
  252. 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70,
  253. 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  254. 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e,
  255. 0x74, 0x65, 0x78, 0x74, 0x73, 0x32, 0xea, 0x01, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
  256. 0x74, 0x73, 0x12, 0x77, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
  257. 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70,
  258. 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  259. 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65,
  260. 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b,
  261. 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f,
  262. 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72,
  263. 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x04, 0x4c,
  264. 0x69, 0x73, 0x74, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72,
  265. 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
  266. 0x65, 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
  267. 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e,
  268. 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65,
  269. 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
  270. 0x73, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
  271. 0x2f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74,
  272. 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31,
  273. 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  274. }
  275. var (
  276. file_protos_contexts_v1_contexts_proto_rawDescOnce sync.Once
  277. file_protos_contexts_v1_contexts_proto_rawDescData = file_protos_contexts_v1_contexts_proto_rawDesc
  278. )
  279. func file_protos_contexts_v1_contexts_proto_rawDescGZIP() []byte {
  280. file_protos_contexts_v1_contexts_proto_rawDescOnce.Do(func() {
  281. file_protos_contexts_v1_contexts_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_contexts_v1_contexts_proto_rawDescData)
  282. })
  283. return file_protos_contexts_v1_contexts_proto_rawDescData
  284. }
  285. var file_protos_contexts_v1_contexts_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
  286. var file_protos_contexts_v1_contexts_proto_goTypes = []interface{}{
  287. (*Context)(nil), // 0: com.docker.api.protos.context.v1.Context
  288. (*SetCurrentRequest)(nil), // 1: com.docker.api.protos.context.v1.SetCurrentRequest
  289. (*SetCurrentResponse)(nil), // 2: com.docker.api.protos.context.v1.SetCurrentResponse
  290. (*ListRequest)(nil), // 3: com.docker.api.protos.context.v1.ListRequest
  291. (*ListResponse)(nil), // 4: com.docker.api.protos.context.v1.ListResponse
  292. }
  293. var file_protos_contexts_v1_contexts_proto_depIdxs = []int32{
  294. 0, // 0: com.docker.api.protos.context.v1.ListResponse.contexts:type_name -> com.docker.api.protos.context.v1.Context
  295. 1, // 1: com.docker.api.protos.context.v1.Contexts.SetCurrent:input_type -> com.docker.api.protos.context.v1.SetCurrentRequest
  296. 3, // 2: com.docker.api.protos.context.v1.Contexts.List:input_type -> com.docker.api.protos.context.v1.ListRequest
  297. 2, // 3: com.docker.api.protos.context.v1.Contexts.SetCurrent:output_type -> com.docker.api.protos.context.v1.SetCurrentResponse
  298. 4, // 4: com.docker.api.protos.context.v1.Contexts.List:output_type -> com.docker.api.protos.context.v1.ListResponse
  299. 3, // [3:5] is the sub-list for method output_type
  300. 1, // [1:3] is the sub-list for method input_type
  301. 1, // [1:1] is the sub-list for extension type_name
  302. 1, // [1:1] is the sub-list for extension extendee
  303. 0, // [0:1] is the sub-list for field type_name
  304. }
  305. func init() { file_protos_contexts_v1_contexts_proto_init() }
  306. func file_protos_contexts_v1_contexts_proto_init() {
  307. if File_protos_contexts_v1_contexts_proto != nil {
  308. return
  309. }
  310. if !protoimpl.UnsafeEnabled {
  311. file_protos_contexts_v1_contexts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  312. switch v := v.(*Context); i {
  313. case 0:
  314. return &v.state
  315. case 1:
  316. return &v.sizeCache
  317. case 2:
  318. return &v.unknownFields
  319. default:
  320. return nil
  321. }
  322. }
  323. file_protos_contexts_v1_contexts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  324. switch v := v.(*SetCurrentRequest); i {
  325. case 0:
  326. return &v.state
  327. case 1:
  328. return &v.sizeCache
  329. case 2:
  330. return &v.unknownFields
  331. default:
  332. return nil
  333. }
  334. }
  335. file_protos_contexts_v1_contexts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  336. switch v := v.(*SetCurrentResponse); i {
  337. case 0:
  338. return &v.state
  339. case 1:
  340. return &v.sizeCache
  341. case 2:
  342. return &v.unknownFields
  343. default:
  344. return nil
  345. }
  346. }
  347. file_protos_contexts_v1_contexts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  348. switch v := v.(*ListRequest); i {
  349. case 0:
  350. return &v.state
  351. case 1:
  352. return &v.sizeCache
  353. case 2:
  354. return &v.unknownFields
  355. default:
  356. return nil
  357. }
  358. }
  359. file_protos_contexts_v1_contexts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  360. switch v := v.(*ListResponse); i {
  361. case 0:
  362. return &v.state
  363. case 1:
  364. return &v.sizeCache
  365. case 2:
  366. return &v.unknownFields
  367. default:
  368. return nil
  369. }
  370. }
  371. }
  372. type x struct{}
  373. out := protoimpl.TypeBuilder{
  374. File: protoimpl.DescBuilder{
  375. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  376. RawDescriptor: file_protos_contexts_v1_contexts_proto_rawDesc,
  377. NumEnums: 0,
  378. NumMessages: 5,
  379. NumExtensions: 0,
  380. NumServices: 1,
  381. },
  382. GoTypes: file_protos_contexts_v1_contexts_proto_goTypes,
  383. DependencyIndexes: file_protos_contexts_v1_contexts_proto_depIdxs,
  384. MessageInfos: file_protos_contexts_v1_contexts_proto_msgTypes,
  385. }.Build()
  386. File_protos_contexts_v1_contexts_proto = out.File
  387. file_protos_contexts_v1_contexts_proto_rawDesc = nil
  388. file_protos_contexts_v1_contexts_proto_goTypes = nil
  389. file_protos_contexts_v1_contexts_proto_depIdxs = nil
  390. }
  391. // Reference imports to suppress errors if they are not otherwise used.
  392. var _ context.Context
  393. var _ grpc.ClientConnInterface
  394. // This is a compile-time assertion to ensure that this generated file
  395. // is compatible with the grpc package it is being compiled against.
  396. const _ = grpc.SupportPackageIsVersion6
  397. // ContextsClient is the client API for Contexts service.
  398. //
  399. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  400. type ContextsClient interface {
  401. // Sets the current request for all calls
  402. SetCurrent(ctx context.Context, in *SetCurrentRequest, opts ...grpc.CallOption) (*SetCurrentResponse, error)
  403. // Returns the list of existing contexts
  404. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
  405. }
  406. type contextsClient struct {
  407. cc grpc.ClientConnInterface
  408. }
  409. func NewContextsClient(cc grpc.ClientConnInterface) ContextsClient {
  410. return &contextsClient{cc}
  411. }
  412. func (c *contextsClient) SetCurrent(ctx context.Context, in *SetCurrentRequest, opts ...grpc.CallOption) (*SetCurrentResponse, error) {
  413. out := new(SetCurrentResponse)
  414. err := c.cc.Invoke(ctx, "/com.docker.api.protos.context.v1.Contexts/SetCurrent", in, out, opts...)
  415. if err != nil {
  416. return nil, err
  417. }
  418. return out, nil
  419. }
  420. func (c *contextsClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
  421. out := new(ListResponse)
  422. err := c.cc.Invoke(ctx, "/com.docker.api.protos.context.v1.Contexts/List", in, out, opts...)
  423. if err != nil {
  424. return nil, err
  425. }
  426. return out, nil
  427. }
  428. // ContextsServer is the server API for Contexts service.
  429. type ContextsServer interface {
  430. // Sets the current request for all calls
  431. SetCurrent(context.Context, *SetCurrentRequest) (*SetCurrentResponse, error)
  432. // Returns the list of existing contexts
  433. List(context.Context, *ListRequest) (*ListResponse, error)
  434. }
  435. // UnimplementedContextsServer can be embedded to have forward compatible implementations.
  436. type UnimplementedContextsServer struct {
  437. }
  438. func (*UnimplementedContextsServer) SetCurrent(context.Context, *SetCurrentRequest) (*SetCurrentResponse, error) {
  439. return nil, status.Errorf(codes.Unimplemented, "method SetCurrent not implemented")
  440. }
  441. func (*UnimplementedContextsServer) List(context.Context, *ListRequest) (*ListResponse, error) {
  442. return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
  443. }
  444. func RegisterContextsServer(s *grpc.Server, srv ContextsServer) {
  445. s.RegisterService(&_Contexts_serviceDesc, srv)
  446. }
  447. func _Contexts_SetCurrent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  448. in := new(SetCurrentRequest)
  449. if err := dec(in); err != nil {
  450. return nil, err
  451. }
  452. if interceptor == nil {
  453. return srv.(ContextsServer).SetCurrent(ctx, in)
  454. }
  455. info := &grpc.UnaryServerInfo{
  456. Server: srv,
  457. FullMethod: "/com.docker.api.protos.context.v1.Contexts/SetCurrent",
  458. }
  459. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  460. return srv.(ContextsServer).SetCurrent(ctx, req.(*SetCurrentRequest))
  461. }
  462. return interceptor(ctx, in, info, handler)
  463. }
  464. func _Contexts_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  465. in := new(ListRequest)
  466. if err := dec(in); err != nil {
  467. return nil, err
  468. }
  469. if interceptor == nil {
  470. return srv.(ContextsServer).List(ctx, in)
  471. }
  472. info := &grpc.UnaryServerInfo{
  473. Server: srv,
  474. FullMethod: "/com.docker.api.protos.context.v1.Contexts/List",
  475. }
  476. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  477. return srv.(ContextsServer).List(ctx, req.(*ListRequest))
  478. }
  479. return interceptor(ctx, in, info, handler)
  480. }
  481. var _Contexts_serviceDesc = grpc.ServiceDesc{
  482. ServiceName: "com.docker.api.protos.context.v1.Contexts",
  483. HandlerType: (*ContextsServer)(nil),
  484. Methods: []grpc.MethodDesc{
  485. {
  486. MethodName: "SetCurrent",
  487. Handler: _Contexts_SetCurrent_Handler,
  488. },
  489. {
  490. MethodName: "List",
  491. Handler: _Contexts_List_Handler,
  492. },
  493. },
  494. Streams: []grpc.StreamDesc{},
  495. Metadata: "protos/contexts/v1/contexts.proto",
  496. }