data.pb.go 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0-devel
  4. // protoc v3.13.0
  5. // source: data.proto
  6. package linux
  7. import (
  8. context "context"
  9. empty "github.com/golang/protobuf/ptypes/empty"
  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. type PingResp struct {
  25. state protoimpl.MessageState
  26. sizeCache protoimpl.SizeCache
  27. unknownFields protoimpl.UnknownFields
  28. Success int32 `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
  29. }
  30. func (x *PingResp) Reset() {
  31. *x = PingResp{}
  32. if protoimpl.UnsafeEnabled {
  33. mi := &file_data_proto_msgTypes[0]
  34. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  35. ms.StoreMessageInfo(mi)
  36. }
  37. }
  38. func (x *PingResp) String() string {
  39. return protoimpl.X.MessageStringOf(x)
  40. }
  41. func (*PingResp) ProtoMessage() {}
  42. func (x *PingResp) ProtoReflect() protoreflect.Message {
  43. mi := &file_data_proto_msgTypes[0]
  44. if protoimpl.UnsafeEnabled && x != nil {
  45. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  46. if ms.LoadMessageInfo() == nil {
  47. ms.StoreMessageInfo(mi)
  48. }
  49. return ms
  50. }
  51. return mi.MessageOf(x)
  52. }
  53. // Deprecated: Use PingResp.ProtoReflect.Descriptor instead.
  54. func (*PingResp) Descriptor() ([]byte, []int) {
  55. return file_data_proto_rawDescGZIP(), []int{0}
  56. }
  57. func (x *PingResp) GetSuccess() int32 {
  58. if x != nil {
  59. return x.Success
  60. }
  61. return 0
  62. }
  63. var File_data_proto protoreflect.FileDescriptor
  64. var file_data_proto_rawDesc = []byte{
  65. 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c, 0x69,
  66. 0x6e, 0x75, 0x78, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
  67. 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  68. 0x22, 0x24, 0x0a, 0x08, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07,
  69. 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73,
  70. 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0x39, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31,
  71. 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
  72. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f,
  73. 0x2e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22,
  74. 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x62, 0x06, 0x70, 0x72,
  75. 0x6f, 0x74, 0x6f, 0x33,
  76. }
  77. var (
  78. file_data_proto_rawDescOnce sync.Once
  79. file_data_proto_rawDescData = file_data_proto_rawDesc
  80. )
  81. func file_data_proto_rawDescGZIP() []byte {
  82. file_data_proto_rawDescOnce.Do(func() {
  83. file_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_data_proto_rawDescData)
  84. })
  85. return file_data_proto_rawDescData
  86. }
  87. var file_data_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  88. var file_data_proto_goTypes = []interface{}{
  89. (*PingResp)(nil), // 0: linux.PingResp
  90. (*empty.Empty)(nil), // 1: google.protobuf.Empty
  91. }
  92. var file_data_proto_depIdxs = []int32{
  93. 1, // 0: linux.Data.Ping:input_type -> google.protobuf.Empty
  94. 0, // 1: linux.Data.Ping:output_type -> linux.PingResp
  95. 1, // [1:2] is the sub-list for method output_type
  96. 0, // [0:1] is the sub-list for method input_type
  97. 0, // [0:0] is the sub-list for extension type_name
  98. 0, // [0:0] is the sub-list for extension extendee
  99. 0, // [0:0] is the sub-list for field type_name
  100. }
  101. func init() { file_data_proto_init() }
  102. func file_data_proto_init() {
  103. if File_data_proto != nil {
  104. return
  105. }
  106. if !protoimpl.UnsafeEnabled {
  107. file_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  108. switch v := v.(*PingResp); i {
  109. case 0:
  110. return &v.state
  111. case 1:
  112. return &v.sizeCache
  113. case 2:
  114. return &v.unknownFields
  115. default:
  116. return nil
  117. }
  118. }
  119. }
  120. type x struct{}
  121. out := protoimpl.TypeBuilder{
  122. File: protoimpl.DescBuilder{
  123. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  124. RawDescriptor: file_data_proto_rawDesc,
  125. NumEnums: 0,
  126. NumMessages: 1,
  127. NumExtensions: 0,
  128. NumServices: 1,
  129. },
  130. GoTypes: file_data_proto_goTypes,
  131. DependencyIndexes: file_data_proto_depIdxs,
  132. MessageInfos: file_data_proto_msgTypes,
  133. }.Build()
  134. File_data_proto = out.File
  135. file_data_proto_rawDesc = nil
  136. file_data_proto_goTypes = nil
  137. file_data_proto_depIdxs = nil
  138. }
  139. // Reference imports to suppress errors if they are not otherwise used.
  140. var _ context.Context
  141. var _ grpc.ClientConnInterface
  142. // This is a compile-time assertion to ensure that this generated file
  143. // is compatible with the grpc package it is being compiled against.
  144. const _ = grpc.SupportPackageIsVersion6
  145. // DataClient is the client API for Data service.
  146. //
  147. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  148. type DataClient interface {
  149. Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PingResp, error)
  150. }
  151. type dataClient struct {
  152. cc grpc.ClientConnInterface
  153. }
  154. func NewDataClient(cc grpc.ClientConnInterface) DataClient {
  155. return &dataClient{cc}
  156. }
  157. func (c *dataClient) Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PingResp, error) {
  158. out := new(PingResp)
  159. err := c.cc.Invoke(ctx, "/linux.Data/Ping", in, out, opts...)
  160. if err != nil {
  161. return nil, err
  162. }
  163. return out, nil
  164. }
  165. // DataServer is the server API for Data service.
  166. type DataServer interface {
  167. Ping(context.Context, *empty.Empty) (*PingResp, error)
  168. }
  169. // UnimplementedDataServer can be embedded to have forward compatible implementations.
  170. type UnimplementedDataServer struct {
  171. }
  172. func (*UnimplementedDataServer) Ping(context.Context, *empty.Empty) (*PingResp, error) {
  173. return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
  174. }
  175. func RegisterDataServer(s *grpc.Server, srv DataServer) {
  176. s.RegisterService(&_Data_serviceDesc, srv)
  177. }
  178. func _Data_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  179. in := new(empty.Empty)
  180. if err := dec(in); err != nil {
  181. return nil, err
  182. }
  183. if interceptor == nil {
  184. return srv.(DataServer).Ping(ctx, in)
  185. }
  186. info := &grpc.UnaryServerInfo{
  187. Server: srv,
  188. FullMethod: "/linux.Data/Ping",
  189. }
  190. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  191. return srv.(DataServer).Ping(ctx, req.(*empty.Empty))
  192. }
  193. return interceptor(ctx, in, info, handler)
  194. }
  195. var _Data_serviceDesc = grpc.ServiceDesc{
  196. ServiceName: "linux.Data",
  197. HandlerType: (*DataServer)(nil),
  198. Methods: []grpc.MethodDesc{
  199. {
  200. MethodName: "Ping",
  201. Handler: _Data_Ping_Handler,
  202. },
  203. },
  204. Streams: []grpc.StreamDesc{},
  205. Metadata: "data.proto",
  206. }