cli.pb.go 11 KB

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