cli.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.21.0-devel
  4. // protoc v3.6.1
  5. // source: cli/v1/cli.proto
  6. package v1
  7. import (
  8. context "context"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  14. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  15. reflect "reflect"
  16. sync "sync"
  17. )
  18. const (
  19. // Verify that this generated code is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21. // Verify that runtime/protoimpl is sufficiently up-to-date.
  22. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23. )
  24. // This is a compile-time assertion that a sufficiently up-to-date version
  25. // of the legacy proto package is being used.
  26. const _ = proto.ProtoPackageIsVersion4
  27. type Context struct {
  28. state protoimpl.MessageState
  29. sizeCache protoimpl.SizeCache
  30. unknownFields protoimpl.UnknownFields
  31. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  32. ContextType string `protobuf:"bytes,2,opt,name=contextType,proto3" json:"contextType,omitempty"`
  33. }
  34. func (x *Context) Reset() {
  35. *x = Context{}
  36. if protoimpl.UnsafeEnabled {
  37. mi := &file_cli_v1_cli_proto_msgTypes[0]
  38. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  39. ms.StoreMessageInfo(mi)
  40. }
  41. }
  42. func (x *Context) String() string {
  43. return protoimpl.X.MessageStringOf(x)
  44. }
  45. func (*Context) ProtoMessage() {}
  46. func (x *Context) ProtoReflect() protoreflect.Message {
  47. mi := &file_cli_v1_cli_proto_msgTypes[0]
  48. if protoimpl.UnsafeEnabled && x != nil {
  49. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  50. if ms.LoadMessageInfo() == nil {
  51. ms.StoreMessageInfo(mi)
  52. }
  53. return ms
  54. }
  55. return mi.MessageOf(x)
  56. }
  57. // Deprecated: Use Context.ProtoReflect.Descriptor instead.
  58. func (*Context) Descriptor() ([]byte, []int) {
  59. return file_cli_v1_cli_proto_rawDescGZIP(), []int{0}
  60. }
  61. func (x *Context) GetName() string {
  62. if x != nil {
  63. return x.Name
  64. }
  65. return ""
  66. }
  67. func (x *Context) GetContextType() string {
  68. if x != nil {
  69. return x.ContextType
  70. }
  71. return ""
  72. }
  73. type ContextsRequest struct {
  74. state protoimpl.MessageState
  75. sizeCache protoimpl.SizeCache
  76. unknownFields protoimpl.UnknownFields
  77. }
  78. func (x *ContextsRequest) Reset() {
  79. *x = ContextsRequest{}
  80. if protoimpl.UnsafeEnabled {
  81. mi := &file_cli_v1_cli_proto_msgTypes[1]
  82. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  83. ms.StoreMessageInfo(mi)
  84. }
  85. }
  86. func (x *ContextsRequest) String() string {
  87. return protoimpl.X.MessageStringOf(x)
  88. }
  89. func (*ContextsRequest) ProtoMessage() {}
  90. func (x *ContextsRequest) ProtoReflect() protoreflect.Message {
  91. mi := &file_cli_v1_cli_proto_msgTypes[1]
  92. if protoimpl.UnsafeEnabled && x != nil {
  93. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  94. if ms.LoadMessageInfo() == nil {
  95. ms.StoreMessageInfo(mi)
  96. }
  97. return ms
  98. }
  99. return mi.MessageOf(x)
  100. }
  101. // Deprecated: Use ContextsRequest.ProtoReflect.Descriptor instead.
  102. func (*ContextsRequest) Descriptor() ([]byte, []int) {
  103. return file_cli_v1_cli_proto_rawDescGZIP(), []int{1}
  104. }
  105. type ContextsResponse struct {
  106. state protoimpl.MessageState
  107. sizeCache protoimpl.SizeCache
  108. unknownFields protoimpl.UnknownFields
  109. Contexts []*Context `protobuf:"bytes,1,rep,name=contexts,proto3" json:"contexts,omitempty"`
  110. }
  111. func (x *ContextsResponse) Reset() {
  112. *x = ContextsResponse{}
  113. if protoimpl.UnsafeEnabled {
  114. mi := &file_cli_v1_cli_proto_msgTypes[2]
  115. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  116. ms.StoreMessageInfo(mi)
  117. }
  118. }
  119. func (x *ContextsResponse) String() string {
  120. return protoimpl.X.MessageStringOf(x)
  121. }
  122. func (*ContextsResponse) ProtoMessage() {}
  123. func (x *ContextsResponse) ProtoReflect() protoreflect.Message {
  124. mi := &file_cli_v1_cli_proto_msgTypes[2]
  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 ContextsResponse.ProtoReflect.Descriptor instead.
  135. func (*ContextsResponse) Descriptor() ([]byte, []int) {
  136. return file_cli_v1_cli_proto_rawDescGZIP(), []int{2}
  137. }
  138. func (x *ContextsResponse) GetContexts() []*Context {
  139. if x != nil {
  140. return x.Contexts
  141. }
  142. return nil
  143. }
  144. var File_cli_v1_cli_proto protoreflect.FileDescriptor
  145. var file_cli_v1_cli_proto_rawDesc = []byte{
  146. 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f,
  147. 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61,
  148. 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x3f, 0x0a, 0x07, 0x43, 0x6f, 0x6e,
  149. 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
  150. 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74,
  151. 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63,
  152. 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f,
  153. 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a,
  154. 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
  155. 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20,
  156. 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72,
  157. 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
  158. 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x32, 0x62, 0x0a,
  159. 0x03, 0x43, 0x6c, 0x69, 0x12, 0x5b, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
  160. 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70,
  161. 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
  162. 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64,
  163. 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31,
  164. 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
  165. 0x65, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
  166. 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x76,
  167. 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  168. }
  169. var (
  170. file_cli_v1_cli_proto_rawDescOnce sync.Once
  171. file_cli_v1_cli_proto_rawDescData = file_cli_v1_cli_proto_rawDesc
  172. )
  173. func file_cli_v1_cli_proto_rawDescGZIP() []byte {
  174. file_cli_v1_cli_proto_rawDescOnce.Do(func() {
  175. file_cli_v1_cli_proto_rawDescData = protoimpl.X.CompressGZIP(file_cli_v1_cli_proto_rawDescData)
  176. })
  177. return file_cli_v1_cli_proto_rawDescData
  178. }
  179. var file_cli_v1_cli_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  180. var file_cli_v1_cli_proto_goTypes = []interface{}{
  181. (*Context)(nil), // 0: com.docker.api.cli.v1.Context
  182. (*ContextsRequest)(nil), // 1: com.docker.api.cli.v1.ContextsRequest
  183. (*ContextsResponse)(nil), // 2: com.docker.api.cli.v1.ContextsResponse
  184. }
  185. var file_cli_v1_cli_proto_depIdxs = []int32{
  186. 0, // 0: com.docker.api.cli.v1.ContextsResponse.contexts:type_name -> com.docker.api.cli.v1.Context
  187. 1, // 1: com.docker.api.cli.v1.Cli.Contexts:input_type -> com.docker.api.cli.v1.ContextsRequest
  188. 2, // 2: com.docker.api.cli.v1.Cli.Contexts:output_type -> com.docker.api.cli.v1.ContextsResponse
  189. 2, // [2:3] is the sub-list for method output_type
  190. 1, // [1:2] is the sub-list for method input_type
  191. 1, // [1:1] is the sub-list for extension type_name
  192. 1, // [1:1] is the sub-list for extension extendee
  193. 0, // [0:1] is the sub-list for field type_name
  194. }
  195. func init() { file_cli_v1_cli_proto_init() }
  196. func file_cli_v1_cli_proto_init() {
  197. if File_cli_v1_cli_proto != nil {
  198. return
  199. }
  200. if !protoimpl.UnsafeEnabled {
  201. file_cli_v1_cli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  202. switch v := v.(*Context); i {
  203. case 0:
  204. return &v.state
  205. case 1:
  206. return &v.sizeCache
  207. case 2:
  208. return &v.unknownFields
  209. default:
  210. return nil
  211. }
  212. }
  213. file_cli_v1_cli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  214. switch v := v.(*ContextsRequest); i {
  215. case 0:
  216. return &v.state
  217. case 1:
  218. return &v.sizeCache
  219. case 2:
  220. return &v.unknownFields
  221. default:
  222. return nil
  223. }
  224. }
  225. file_cli_v1_cli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  226. switch v := v.(*ContextsResponse); i {
  227. case 0:
  228. return &v.state
  229. case 1:
  230. return &v.sizeCache
  231. case 2:
  232. return &v.unknownFields
  233. default:
  234. return nil
  235. }
  236. }
  237. }
  238. type x struct{}
  239. out := protoimpl.TypeBuilder{
  240. File: protoimpl.DescBuilder{
  241. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  242. RawDescriptor: file_cli_v1_cli_proto_rawDesc,
  243. NumEnums: 0,
  244. NumMessages: 3,
  245. NumExtensions: 0,
  246. NumServices: 1,
  247. },
  248. GoTypes: file_cli_v1_cli_proto_goTypes,
  249. DependencyIndexes: file_cli_v1_cli_proto_depIdxs,
  250. MessageInfos: file_cli_v1_cli_proto_msgTypes,
  251. }.Build()
  252. File_cli_v1_cli_proto = out.File
  253. file_cli_v1_cli_proto_rawDesc = nil
  254. file_cli_v1_cli_proto_goTypes = nil
  255. file_cli_v1_cli_proto_depIdxs = nil
  256. }
  257. // Reference imports to suppress errors if they are not otherwise used.
  258. var _ context.Context
  259. var _ grpc.ClientConnInterface
  260. // This is a compile-time assertion to ensure that this generated file
  261. // is compatible with the grpc package it is being compiled against.
  262. const _ = grpc.SupportPackageIsVersion6
  263. // CliClient is the client API for Cli service.
  264. //
  265. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  266. type CliClient interface {
  267. // Returns the list of existing contexts
  268. Contexts(ctx context.Context, in *ContextsRequest, opts ...grpc.CallOption) (*ContextsResponse, error)
  269. }
  270. type cliClient struct {
  271. cc grpc.ClientConnInterface
  272. }
  273. func NewCliClient(cc grpc.ClientConnInterface) CliClient {
  274. return &cliClient{cc}
  275. }
  276. func (c *cliClient) Contexts(ctx context.Context, in *ContextsRequest, opts ...grpc.CallOption) (*ContextsResponse, error) {
  277. out := new(ContextsResponse)
  278. err := c.cc.Invoke(ctx, "/com.docker.api.cli.v1.Cli/Contexts", in, out, opts...)
  279. if err != nil {
  280. return nil, err
  281. }
  282. return out, nil
  283. }
  284. // CliServer is the server API for Cli service.
  285. type CliServer interface {
  286. // Returns the list of existing contexts
  287. Contexts(context.Context, *ContextsRequest) (*ContextsResponse, error)
  288. }
  289. // UnimplementedCliServer can be embedded to have forward compatible implementations.
  290. type UnimplementedCliServer struct {
  291. }
  292. func (*UnimplementedCliServer) Contexts(context.Context, *ContextsRequest) (*ContextsResponse, error) {
  293. return nil, status.Errorf(codes.Unimplemented, "method Contexts not implemented")
  294. }
  295. func RegisterCliServer(s *grpc.Server, srv CliServer) {
  296. s.RegisterService(&_Cli_serviceDesc, srv)
  297. }
  298. func _Cli_Contexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  299. in := new(ContextsRequest)
  300. if err := dec(in); err != nil {
  301. return nil, err
  302. }
  303. if interceptor == nil {
  304. return srv.(CliServer).Contexts(ctx, in)
  305. }
  306. info := &grpc.UnaryServerInfo{
  307. Server: srv,
  308. FullMethod: "/com.docker.api.cli.v1.Cli/Contexts",
  309. }
  310. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  311. return srv.(CliServer).Contexts(ctx, req.(*ContextsRequest))
  312. }
  313. return interceptor(ctx, in, info, handler)
  314. }
  315. var _Cli_serviceDesc = grpc.ServiceDesc{
  316. ServiceName: "com.docker.api.cli.v1.Cli",
  317. HandlerType: (*CliServer)(nil),
  318. Methods: []grpc.MethodDesc{
  319. {
  320. MethodName: "Contexts",
  321. Handler: _Cli_Contexts_Handler,
  322. },
  323. },
  324. Streams: []grpc.StreamDesc{},
  325. Metadata: "cli/v1/cli.proto",
  326. }