cli.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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/cli/v1/cli.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_cli_v1_cli_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_cli_v1_cli_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_cli_v1_cli_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 ContextsRequest struct {
  99. state protoimpl.MessageState
  100. sizeCache protoimpl.SizeCache
  101. unknownFields protoimpl.UnknownFields
  102. }
  103. func (x *ContextsRequest) Reset() {
  104. *x = ContextsRequest{}
  105. if protoimpl.UnsafeEnabled {
  106. mi := &file_protos_cli_v1_cli_proto_msgTypes[1]
  107. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  108. ms.StoreMessageInfo(mi)
  109. }
  110. }
  111. func (x *ContextsRequest) String() string {
  112. return protoimpl.X.MessageStringOf(x)
  113. }
  114. func (*ContextsRequest) ProtoMessage() {}
  115. func (x *ContextsRequest) ProtoReflect() protoreflect.Message {
  116. mi := &file_protos_cli_v1_cli_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 ContextsRequest.ProtoReflect.Descriptor instead.
  127. func (*ContextsRequest) Descriptor() ([]byte, []int) {
  128. return file_protos_cli_v1_cli_proto_rawDescGZIP(), []int{1}
  129. }
  130. type ContextsResponse 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 *ContextsResponse) Reset() {
  137. *x = ContextsResponse{}
  138. if protoimpl.UnsafeEnabled {
  139. mi := &file_protos_cli_v1_cli_proto_msgTypes[2]
  140. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  141. ms.StoreMessageInfo(mi)
  142. }
  143. }
  144. func (x *ContextsResponse) String() string {
  145. return protoimpl.X.MessageStringOf(x)
  146. }
  147. func (*ContextsResponse) ProtoMessage() {}
  148. func (x *ContextsResponse) ProtoReflect() protoreflect.Message {
  149. mi := &file_protos_cli_v1_cli_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 ContextsResponse.ProtoReflect.Descriptor instead.
  160. func (*ContextsResponse) Descriptor() ([]byte, []int) {
  161. return file_protos_cli_v1_cli_proto_rawDescGZIP(), []int{2}
  162. }
  163. func (x *ContextsResponse) GetContexts() []*Context {
  164. if x != nil {
  165. return x.Contexts
  166. }
  167. return nil
  168. }
  169. var File_protos_cli_v1_cli_proto protoreflect.FileDescriptor
  170. var file_protos_cli_v1_cli_proto_rawDesc = []byte{
  171. 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f,
  172. 0x63, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x64,
  173. 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
  174. 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x3f, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65,
  175. 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
  176. 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
  177. 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e,
  178. 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74,
  179. 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x10, 0x43,
  180. 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
  181. 0x41, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
  182. 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61,
  183. 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31,
  184. 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
  185. 0x74, 0x73, 0x32, 0x70, 0x0a, 0x03, 0x43, 0x6c, 0x69, 0x12, 0x69, 0x0a, 0x08, 0x43, 0x6f, 0x6e,
  186. 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b,
  187. 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6c,
  188. 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71,
  189. 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65,
  190. 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6c, 0x69,
  191. 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
  192. 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
  193. 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72,
  194. 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06,
  195. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  196. }
  197. var (
  198. file_protos_cli_v1_cli_proto_rawDescOnce sync.Once
  199. file_protos_cli_v1_cli_proto_rawDescData = file_protos_cli_v1_cli_proto_rawDesc
  200. )
  201. func file_protos_cli_v1_cli_proto_rawDescGZIP() []byte {
  202. file_protos_cli_v1_cli_proto_rawDescOnce.Do(func() {
  203. file_protos_cli_v1_cli_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_cli_v1_cli_proto_rawDescData)
  204. })
  205. return file_protos_cli_v1_cli_proto_rawDescData
  206. }
  207. var file_protos_cli_v1_cli_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  208. var file_protos_cli_v1_cli_proto_goTypes = []interface{}{
  209. (*Context)(nil), // 0: com.docker.api.protos.cli.v1.Context
  210. (*ContextsRequest)(nil), // 1: com.docker.api.protos.cli.v1.ContextsRequest
  211. (*ContextsResponse)(nil), // 2: com.docker.api.protos.cli.v1.ContextsResponse
  212. }
  213. var file_protos_cli_v1_cli_proto_depIdxs = []int32{
  214. 0, // 0: com.docker.api.protos.cli.v1.ContextsResponse.contexts:type_name -> com.docker.api.protos.cli.v1.Context
  215. 1, // 1: com.docker.api.protos.cli.v1.Cli.Contexts:input_type -> com.docker.api.protos.cli.v1.ContextsRequest
  216. 2, // 2: com.docker.api.protos.cli.v1.Cli.Contexts:output_type -> com.docker.api.protos.cli.v1.ContextsResponse
  217. 2, // [2:3] is the sub-list for method output_type
  218. 1, // [1:2] is the sub-list for method input_type
  219. 1, // [1:1] is the sub-list for extension type_name
  220. 1, // [1:1] is the sub-list for extension extendee
  221. 0, // [0:1] is the sub-list for field type_name
  222. }
  223. func init() { file_protos_cli_v1_cli_proto_init() }
  224. func file_protos_cli_v1_cli_proto_init() {
  225. if File_protos_cli_v1_cli_proto != nil {
  226. return
  227. }
  228. if !protoimpl.UnsafeEnabled {
  229. file_protos_cli_v1_cli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  230. switch v := v.(*Context); i {
  231. case 0:
  232. return &v.state
  233. case 1:
  234. return &v.sizeCache
  235. case 2:
  236. return &v.unknownFields
  237. default:
  238. return nil
  239. }
  240. }
  241. file_protos_cli_v1_cli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  242. switch v := v.(*ContextsRequest); i {
  243. case 0:
  244. return &v.state
  245. case 1:
  246. return &v.sizeCache
  247. case 2:
  248. return &v.unknownFields
  249. default:
  250. return nil
  251. }
  252. }
  253. file_protos_cli_v1_cli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  254. switch v := v.(*ContextsResponse); i {
  255. case 0:
  256. return &v.state
  257. case 1:
  258. return &v.sizeCache
  259. case 2:
  260. return &v.unknownFields
  261. default:
  262. return nil
  263. }
  264. }
  265. }
  266. type x struct{}
  267. out := protoimpl.TypeBuilder{
  268. File: protoimpl.DescBuilder{
  269. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  270. RawDescriptor: file_protos_cli_v1_cli_proto_rawDesc,
  271. NumEnums: 0,
  272. NumMessages: 3,
  273. NumExtensions: 0,
  274. NumServices: 1,
  275. },
  276. GoTypes: file_protos_cli_v1_cli_proto_goTypes,
  277. DependencyIndexes: file_protos_cli_v1_cli_proto_depIdxs,
  278. MessageInfos: file_protos_cli_v1_cli_proto_msgTypes,
  279. }.Build()
  280. File_protos_cli_v1_cli_proto = out.File
  281. file_protos_cli_v1_cli_proto_rawDesc = nil
  282. file_protos_cli_v1_cli_proto_goTypes = nil
  283. file_protos_cli_v1_cli_proto_depIdxs = nil
  284. }
  285. // Reference imports to suppress errors if they are not otherwise used.
  286. var _ context.Context
  287. var _ grpc.ClientConnInterface
  288. // This is a compile-time assertion to ensure that this generated file
  289. // is compatible with the grpc package it is being compiled against.
  290. const _ = grpc.SupportPackageIsVersion6
  291. // CliClient is the client API for Cli service.
  292. //
  293. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  294. type CliClient interface {
  295. // Returns the list of existing contexts
  296. Contexts(ctx context.Context, in *ContextsRequest, opts ...grpc.CallOption) (*ContextsResponse, error)
  297. }
  298. type cliClient struct {
  299. cc grpc.ClientConnInterface
  300. }
  301. func NewCliClient(cc grpc.ClientConnInterface) CliClient {
  302. return &cliClient{cc}
  303. }
  304. func (c *cliClient) Contexts(ctx context.Context, in *ContextsRequest, opts ...grpc.CallOption) (*ContextsResponse, error) {
  305. out := new(ContextsResponse)
  306. err := c.cc.Invoke(ctx, "/com.docker.api.protos.cli.v1.Cli/Contexts", in, out, opts...)
  307. if err != nil {
  308. return nil, err
  309. }
  310. return out, nil
  311. }
  312. // CliServer is the server API for Cli service.
  313. type CliServer interface {
  314. // Returns the list of existing contexts
  315. Contexts(context.Context, *ContextsRequest) (*ContextsResponse, error)
  316. }
  317. // UnimplementedCliServer can be embedded to have forward compatible implementations.
  318. type UnimplementedCliServer struct {
  319. }
  320. func (*UnimplementedCliServer) Contexts(context.Context, *ContextsRequest) (*ContextsResponse, error) {
  321. return nil, status.Errorf(codes.Unimplemented, "method Contexts not implemented")
  322. }
  323. func RegisterCliServer(s *grpc.Server, srv CliServer) {
  324. s.RegisterService(&_Cli_serviceDesc, srv)
  325. }
  326. func _Cli_Contexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  327. in := new(ContextsRequest)
  328. if err := dec(in); err != nil {
  329. return nil, err
  330. }
  331. if interceptor == nil {
  332. return srv.(CliServer).Contexts(ctx, in)
  333. }
  334. info := &grpc.UnaryServerInfo{
  335. Server: srv,
  336. FullMethod: "/com.docker.api.protos.cli.v1.Cli/Contexts",
  337. }
  338. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  339. return srv.(CliServer).Contexts(ctx, req.(*ContextsRequest))
  340. }
  341. return interceptor(ctx, in, info, handler)
  342. }
  343. var _Cli_serviceDesc = grpc.ServiceDesc{
  344. ServiceName: "com.docker.api.protos.cli.v1.Cli",
  345. HandlerType: (*CliServer)(nil),
  346. Methods: []grpc.MethodDesc{
  347. {
  348. MethodName: "Contexts",
  349. Handler: _Cli_Contexts_Handler,
  350. },
  351. },
  352. Streams: []grpc.StreamDesc{},
  353. Metadata: "protos/cli/v1/cli.proto",
  354. }