contexts.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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.22.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. }
  59. func (x *Context) Reset() {
  60. *x = Context{}
  61. if protoimpl.UnsafeEnabled {
  62. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[0]
  63. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  64. ms.StoreMessageInfo(mi)
  65. }
  66. }
  67. func (x *Context) String() string {
  68. return protoimpl.X.MessageStringOf(x)
  69. }
  70. func (*Context) ProtoMessage() {}
  71. func (x *Context) ProtoReflect() protoreflect.Message {
  72. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[0]
  73. if protoimpl.UnsafeEnabled && x != nil {
  74. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  75. if ms.LoadMessageInfo() == nil {
  76. ms.StoreMessageInfo(mi)
  77. }
  78. return ms
  79. }
  80. return mi.MessageOf(x)
  81. }
  82. // Deprecated: Use Context.ProtoReflect.Descriptor instead.
  83. func (*Context) Descriptor() ([]byte, []int) {
  84. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{0}
  85. }
  86. func (x *Context) GetName() string {
  87. if x != nil {
  88. return x.Name
  89. }
  90. return ""
  91. }
  92. func (x *Context) GetContextType() string {
  93. if x != nil {
  94. return x.ContextType
  95. }
  96. return ""
  97. }
  98. type ListRequest struct {
  99. state protoimpl.MessageState
  100. sizeCache protoimpl.SizeCache
  101. unknownFields protoimpl.UnknownFields
  102. }
  103. func (x *ListRequest) Reset() {
  104. *x = ListRequest{}
  105. if protoimpl.UnsafeEnabled {
  106. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[1]
  107. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  108. ms.StoreMessageInfo(mi)
  109. }
  110. }
  111. func (x *ListRequest) String() string {
  112. return protoimpl.X.MessageStringOf(x)
  113. }
  114. func (*ListRequest) ProtoMessage() {}
  115. func (x *ListRequest) ProtoReflect() protoreflect.Message {
  116. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[1]
  117. if protoimpl.UnsafeEnabled && x != nil {
  118. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  119. if ms.LoadMessageInfo() == nil {
  120. ms.StoreMessageInfo(mi)
  121. }
  122. return ms
  123. }
  124. return mi.MessageOf(x)
  125. }
  126. // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
  127. func (*ListRequest) Descriptor() ([]byte, []int) {
  128. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{1}
  129. }
  130. type ListResponse struct {
  131. state protoimpl.MessageState
  132. sizeCache protoimpl.SizeCache
  133. unknownFields protoimpl.UnknownFields
  134. Contexts []*Context `protobuf:"bytes,1,rep,name=contexts,proto3" json:"contexts,omitempty"`
  135. }
  136. func (x *ListResponse) Reset() {
  137. *x = ListResponse{}
  138. if protoimpl.UnsafeEnabled {
  139. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[2]
  140. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  141. ms.StoreMessageInfo(mi)
  142. }
  143. }
  144. func (x *ListResponse) String() string {
  145. return protoimpl.X.MessageStringOf(x)
  146. }
  147. func (*ListResponse) ProtoMessage() {}
  148. func (x *ListResponse) ProtoReflect() protoreflect.Message {
  149. mi := &file_protos_contexts_v1_contexts_proto_msgTypes[2]
  150. if protoimpl.UnsafeEnabled && x != nil {
  151. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  152. if ms.LoadMessageInfo() == nil {
  153. ms.StoreMessageInfo(mi)
  154. }
  155. return ms
  156. }
  157. return mi.MessageOf(x)
  158. }
  159. // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
  160. func (*ListResponse) Descriptor() ([]byte, []int) {
  161. return file_protos_contexts_v1_contexts_proto_rawDescGZIP(), []int{2}
  162. }
  163. func (x *ListResponse) GetContexts() []*Context {
  164. if x != nil {
  165. return x.Contexts
  166. }
  167. return nil
  168. }
  169. var File_protos_contexts_v1_contexts_proto protoreflect.FileDescriptor
  170. var file_protos_contexts_v1_contexts_proto_rawDesc = []byte{
  171. 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  172. 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x2e, 0x70, 0x72,
  173. 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e,
  174. 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65,
  175. 0x78, 0x74, 0x2e, 0x76, 0x31, 0x22, 0x3f, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  176. 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
  177. 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54,
  178. 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65,
  179. 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
  180. 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
  181. 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  182. 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f,
  183. 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
  184. 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65,
  185. 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x32, 0x71, 0x0a, 0x08,
  186. 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x65, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74,
  187. 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70,
  188. 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  189. 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
  190. 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
  191. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e,
  192. 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
  193. 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f,
  194. 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f,
  195. 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70,
  196. 0x72, 0x6f, 0x74, 0x6f, 0x33,
  197. }
  198. var (
  199. file_protos_contexts_v1_contexts_proto_rawDescOnce sync.Once
  200. file_protos_contexts_v1_contexts_proto_rawDescData = file_protos_contexts_v1_contexts_proto_rawDesc
  201. )
  202. func file_protos_contexts_v1_contexts_proto_rawDescGZIP() []byte {
  203. file_protos_contexts_v1_contexts_proto_rawDescOnce.Do(func() {
  204. file_protos_contexts_v1_contexts_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_contexts_v1_contexts_proto_rawDescData)
  205. })
  206. return file_protos_contexts_v1_contexts_proto_rawDescData
  207. }
  208. var file_protos_contexts_v1_contexts_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  209. var file_protos_contexts_v1_contexts_proto_goTypes = []interface{}{
  210. (*Context)(nil), // 0: com.docker.api.protos.context.v1.Context
  211. (*ListRequest)(nil), // 1: com.docker.api.protos.context.v1.ListRequest
  212. (*ListResponse)(nil), // 2: com.docker.api.protos.context.v1.ListResponse
  213. }
  214. var file_protos_contexts_v1_contexts_proto_depIdxs = []int32{
  215. 0, // 0: com.docker.api.protos.context.v1.ListResponse.contexts:type_name -> com.docker.api.protos.context.v1.Context
  216. 1, // 1: com.docker.api.protos.context.v1.Contexts.List:input_type -> com.docker.api.protos.context.v1.ListRequest
  217. 2, // 2: com.docker.api.protos.context.v1.Contexts.List:output_type -> com.docker.api.protos.context.v1.ListResponse
  218. 2, // [2:3] is the sub-list for method output_type
  219. 1, // [1:2] is the sub-list for method input_type
  220. 1, // [1:1] is the sub-list for extension type_name
  221. 1, // [1:1] is the sub-list for extension extendee
  222. 0, // [0:1] is the sub-list for field type_name
  223. }
  224. func init() { file_protos_contexts_v1_contexts_proto_init() }
  225. func file_protos_contexts_v1_contexts_proto_init() {
  226. if File_protos_contexts_v1_contexts_proto != nil {
  227. return
  228. }
  229. if !protoimpl.UnsafeEnabled {
  230. file_protos_contexts_v1_contexts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  231. switch v := v.(*Context); i {
  232. case 0:
  233. return &v.state
  234. case 1:
  235. return &v.sizeCache
  236. case 2:
  237. return &v.unknownFields
  238. default:
  239. return nil
  240. }
  241. }
  242. file_protos_contexts_v1_contexts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  243. switch v := v.(*ListRequest); i {
  244. case 0:
  245. return &v.state
  246. case 1:
  247. return &v.sizeCache
  248. case 2:
  249. return &v.unknownFields
  250. default:
  251. return nil
  252. }
  253. }
  254. file_protos_contexts_v1_contexts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  255. switch v := v.(*ListResponse); i {
  256. case 0:
  257. return &v.state
  258. case 1:
  259. return &v.sizeCache
  260. case 2:
  261. return &v.unknownFields
  262. default:
  263. return nil
  264. }
  265. }
  266. }
  267. type x struct{}
  268. out := protoimpl.TypeBuilder{
  269. File: protoimpl.DescBuilder{
  270. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  271. RawDescriptor: file_protos_contexts_v1_contexts_proto_rawDesc,
  272. NumEnums: 0,
  273. NumMessages: 3,
  274. NumExtensions: 0,
  275. NumServices: 1,
  276. },
  277. GoTypes: file_protos_contexts_v1_contexts_proto_goTypes,
  278. DependencyIndexes: file_protos_contexts_v1_contexts_proto_depIdxs,
  279. MessageInfos: file_protos_contexts_v1_contexts_proto_msgTypes,
  280. }.Build()
  281. File_protos_contexts_v1_contexts_proto = out.File
  282. file_protos_contexts_v1_contexts_proto_rawDesc = nil
  283. file_protos_contexts_v1_contexts_proto_goTypes = nil
  284. file_protos_contexts_v1_contexts_proto_depIdxs = nil
  285. }
  286. // Reference imports to suppress errors if they are not otherwise used.
  287. var _ context.Context
  288. var _ grpc.ClientConnInterface
  289. // This is a compile-time assertion to ensure that this generated file
  290. // is compatible with the grpc package it is being compiled against.
  291. const _ = grpc.SupportPackageIsVersion6
  292. // ContextsClient is the client API for Contexts service.
  293. //
  294. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  295. type ContextsClient interface {
  296. // Returns the list of existing contexts
  297. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
  298. }
  299. type contextsClient struct {
  300. cc grpc.ClientConnInterface
  301. }
  302. func NewContextsClient(cc grpc.ClientConnInterface) ContextsClient {
  303. return &contextsClient{cc}
  304. }
  305. func (c *contextsClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
  306. out := new(ListResponse)
  307. err := c.cc.Invoke(ctx, "/com.docker.api.protos.context.v1.Contexts/List", in, out, opts...)
  308. if err != nil {
  309. return nil, err
  310. }
  311. return out, nil
  312. }
  313. // ContextsServer is the server API for Contexts service.
  314. type ContextsServer interface {
  315. // Returns the list of existing contexts
  316. List(context.Context, *ListRequest) (*ListResponse, error)
  317. }
  318. // UnimplementedContextsServer can be embedded to have forward compatible implementations.
  319. type UnimplementedContextsServer struct {
  320. }
  321. func (*UnimplementedContextsServer) List(context.Context, *ListRequest) (*ListResponse, error) {
  322. return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
  323. }
  324. func RegisterContextsServer(s *grpc.Server, srv ContextsServer) {
  325. s.RegisterService(&_Contexts_serviceDesc, srv)
  326. }
  327. func _Contexts_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  328. in := new(ListRequest)
  329. if err := dec(in); err != nil {
  330. return nil, err
  331. }
  332. if interceptor == nil {
  333. return srv.(ContextsServer).List(ctx, in)
  334. }
  335. info := &grpc.UnaryServerInfo{
  336. Server: srv,
  337. FullMethod: "/com.docker.api.protos.context.v1.Contexts/List",
  338. }
  339. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  340. return srv.(ContextsServer).List(ctx, req.(*ListRequest))
  341. }
  342. return interceptor(ctx, in, info, handler)
  343. }
  344. var _Contexts_serviceDesc = grpc.ServiceDesc{
  345. ServiceName: "com.docker.api.protos.context.v1.Contexts",
  346. HandlerType: (*ContextsServer)(nil),
  347. Methods: []grpc.MethodDesc{
  348. {
  349. MethodName: "List",
  350. Handler: _Contexts_List_Handler,
  351. },
  352. },
  353. Streams: []grpc.StreamDesc{},
  354. Metadata: "protos/contexts/v1/contexts.proto",
  355. }