contexts.pb.go 20 KB

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