cli.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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.21.0-devel
  29. // protoc v3.6.1
  30. // source: cli/v1/cli.proto
  31. package v1
  32. import (
  33. context "context"
  34. reflect "reflect"
  35. sync "sync"
  36. proto "github.com/golang/protobuf/proto"
  37. grpc "google.golang.org/grpc"
  38. codes "google.golang.org/grpc/codes"
  39. status "google.golang.org/grpc/status"
  40. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  41. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  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_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_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_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_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_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_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_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_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_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_cli_v1_cli_proto protoreflect.FileDescriptor
  170. var file_cli_v1_cli_proto_rawDesc = []byte{
  171. 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f,
  172. 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61,
  173. 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x3f, 0x0a, 0x07, 0x43, 0x6f, 0x6e,
  174. 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
  175. 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74,
  176. 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63,
  177. 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f,
  178. 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a,
  179. 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
  180. 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20,
  181. 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72,
  182. 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
  183. 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x32, 0x62, 0x0a,
  184. 0x03, 0x43, 0x6c, 0x69, 0x12, 0x5b, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
  185. 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70,
  186. 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  187. 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64,
  188. 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31,
  189. 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
  190. 0x65, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
  191. 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x76,
  192. 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  193. }
  194. var (
  195. file_cli_v1_cli_proto_rawDescOnce sync.Once
  196. file_cli_v1_cli_proto_rawDescData = file_cli_v1_cli_proto_rawDesc
  197. )
  198. func file_cli_v1_cli_proto_rawDescGZIP() []byte {
  199. file_cli_v1_cli_proto_rawDescOnce.Do(func() {
  200. file_cli_v1_cli_proto_rawDescData = protoimpl.X.CompressGZIP(file_cli_v1_cli_proto_rawDescData)
  201. })
  202. return file_cli_v1_cli_proto_rawDescData
  203. }
  204. var file_cli_v1_cli_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  205. var file_cli_v1_cli_proto_goTypes = []interface{}{
  206. (*Context)(nil), // 0: com.docker.api.cli.v1.Context
  207. (*ContextsRequest)(nil), // 1: com.docker.api.cli.v1.ContextsRequest
  208. (*ContextsResponse)(nil), // 2: com.docker.api.cli.v1.ContextsResponse
  209. }
  210. var file_cli_v1_cli_proto_depIdxs = []int32{
  211. 0, // 0: com.docker.api.cli.v1.ContextsResponse.contexts:type_name -> com.docker.api.cli.v1.Context
  212. 1, // 1: com.docker.api.cli.v1.Cli.Contexts:input_type -> com.docker.api.cli.v1.ContextsRequest
  213. 2, // 2: com.docker.api.cli.v1.Cli.Contexts:output_type -> com.docker.api.cli.v1.ContextsResponse
  214. 2, // [2:3] is the sub-list for method output_type
  215. 1, // [1:2] is the sub-list for method input_type
  216. 1, // [1:1] is the sub-list for extension type_name
  217. 1, // [1:1] is the sub-list for extension extendee
  218. 0, // [0:1] is the sub-list for field type_name
  219. }
  220. func init() { file_cli_v1_cli_proto_init() }
  221. func file_cli_v1_cli_proto_init() {
  222. if File_cli_v1_cli_proto != nil {
  223. return
  224. }
  225. if !protoimpl.UnsafeEnabled {
  226. file_cli_v1_cli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  227. switch v := v.(*Context); i {
  228. case 0:
  229. return &v.state
  230. case 1:
  231. return &v.sizeCache
  232. case 2:
  233. return &v.unknownFields
  234. default:
  235. return nil
  236. }
  237. }
  238. file_cli_v1_cli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  239. switch v := v.(*ContextsRequest); i {
  240. case 0:
  241. return &v.state
  242. case 1:
  243. return &v.sizeCache
  244. case 2:
  245. return &v.unknownFields
  246. default:
  247. return nil
  248. }
  249. }
  250. file_cli_v1_cli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  251. switch v := v.(*ContextsResponse); i {
  252. case 0:
  253. return &v.state
  254. case 1:
  255. return &v.sizeCache
  256. case 2:
  257. return &v.unknownFields
  258. default:
  259. return nil
  260. }
  261. }
  262. }
  263. type x struct{}
  264. out := protoimpl.TypeBuilder{
  265. File: protoimpl.DescBuilder{
  266. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  267. RawDescriptor: file_cli_v1_cli_proto_rawDesc,
  268. NumEnums: 0,
  269. NumMessages: 3,
  270. NumExtensions: 0,
  271. NumServices: 1,
  272. },
  273. GoTypes: file_cli_v1_cli_proto_goTypes,
  274. DependencyIndexes: file_cli_v1_cli_proto_depIdxs,
  275. MessageInfos: file_cli_v1_cli_proto_msgTypes,
  276. }.Build()
  277. File_cli_v1_cli_proto = out.File
  278. file_cli_v1_cli_proto_rawDesc = nil
  279. file_cli_v1_cli_proto_goTypes = nil
  280. file_cli_v1_cli_proto_depIdxs = nil
  281. }
  282. // Reference imports to suppress errors if they are not otherwise used.
  283. var _ context.Context
  284. var _ grpc.ClientConnInterface
  285. // This is a compile-time assertion to ensure that this generated file
  286. // is compatible with the grpc package it is being compiled against.
  287. const _ = grpc.SupportPackageIsVersion6
  288. // CliClient is the client API for Cli service.
  289. //
  290. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  291. type CliClient interface {
  292. // Returns the list of existing contexts
  293. Contexts(ctx context.Context, in *ContextsRequest, opts ...grpc.CallOption) (*ContextsResponse, error)
  294. }
  295. type cliClient struct {
  296. cc grpc.ClientConnInterface
  297. }
  298. func NewCliClient(cc grpc.ClientConnInterface) CliClient {
  299. return &cliClient{cc}
  300. }
  301. func (c *cliClient) Contexts(ctx context.Context, in *ContextsRequest, opts ...grpc.CallOption) (*ContextsResponse, error) {
  302. out := new(ContextsResponse)
  303. err := c.cc.Invoke(ctx, "/com.docker.api.cli.v1.Cli/Contexts", in, out, opts...)
  304. if err != nil {
  305. return nil, err
  306. }
  307. return out, nil
  308. }
  309. // CliServer is the server API for Cli service.
  310. type CliServer interface {
  311. // Returns the list of existing contexts
  312. Contexts(context.Context, *ContextsRequest) (*ContextsResponse, error)
  313. }
  314. // UnimplementedCliServer can be embedded to have forward compatible implementations.
  315. type UnimplementedCliServer struct {
  316. }
  317. func (*UnimplementedCliServer) Contexts(context.Context, *ContextsRequest) (*ContextsResponse, error) {
  318. return nil, status.Errorf(codes.Unimplemented, "method Contexts not implemented")
  319. }
  320. func RegisterCliServer(s *grpc.Server, srv CliServer) {
  321. s.RegisterService(&_Cli_serviceDesc, srv)
  322. }
  323. func _Cli_Contexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  324. in := new(ContextsRequest)
  325. if err := dec(in); err != nil {
  326. return nil, err
  327. }
  328. if interceptor == nil {
  329. return srv.(CliServer).Contexts(ctx, in)
  330. }
  331. info := &grpc.UnaryServerInfo{
  332. Server: srv,
  333. FullMethod: "/com.docker.api.cli.v1.Cli/Contexts",
  334. }
  335. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  336. return srv.(CliServer).Contexts(ctx, req.(*ContextsRequest))
  337. }
  338. return interceptor(ctx, in, info, handler)
  339. }
  340. var _Cli_serviceDesc = grpc.ServiceDesc{
  341. ServiceName: "com.docker.api.cli.v1.Cli",
  342. HandlerType: (*CliServer)(nil),
  343. Methods: []grpc.MethodDesc{
  344. {
  345. MethodName: "Contexts",
  346. Handler: _Cli_Contexts_Handler,
  347. },
  348. },
  349. Streams: []grpc.StreamDesc{},
  350. Metadata: "cli/v1/cli.proto",
  351. }