test.pb.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: test.proto
  3. package test
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. math "math"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. // This is a compile-time assertion to ensure that this generated file
  16. // is compatible with the proto package it is being compiled against.
  17. // A compilation error at this line likely means your copy of the
  18. // proto package needs to be updated.
  19. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  20. type ReqData struct {
  21. In string `protobuf:"bytes,1,opt,name=In,proto3" json:"In,omitempty"`
  22. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  23. XXX_unrecognized []byte `json:"-"`
  24. XXX_sizecache int32 `json:"-"`
  25. }
  26. func (m *ReqData) Reset() { *m = ReqData{} }
  27. func (m *ReqData) String() string { return proto.CompactTextString(m) }
  28. func (*ReqData) ProtoMessage() {}
  29. func (*ReqData) Descriptor() ([]byte, []int) {
  30. return fileDescriptor_c161fcfdc0c3ff1e, []int{0}
  31. }
  32. func (m *ReqData) XXX_Unmarshal(b []byte) error {
  33. return xxx_messageInfo_ReqData.Unmarshal(m, b)
  34. }
  35. func (m *ReqData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  36. return xxx_messageInfo_ReqData.Marshal(b, m, deterministic)
  37. }
  38. func (m *ReqData) XXX_Merge(src proto.Message) {
  39. xxx_messageInfo_ReqData.Merge(m, src)
  40. }
  41. func (m *ReqData) XXX_Size() int {
  42. return xxx_messageInfo_ReqData.Size(m)
  43. }
  44. func (m *ReqData) XXX_DiscardUnknown() {
  45. xxx_messageInfo_ReqData.DiscardUnknown(m)
  46. }
  47. var xxx_messageInfo_ReqData proto.InternalMessageInfo
  48. func (m *ReqData) GetIn() string {
  49. if m != nil {
  50. return m.In
  51. }
  52. return ""
  53. }
  54. type ReplyData struct {
  55. Out string `protobuf:"bytes,1,opt,name=Out,proto3" json:"Out,omitempty"`
  56. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  57. XXX_unrecognized []byte `json:"-"`
  58. XXX_sizecache int32 `json:"-"`
  59. }
  60. func (m *ReplyData) Reset() { *m = ReplyData{} }
  61. func (m *ReplyData) String() string { return proto.CompactTextString(m) }
  62. func (*ReplyData) ProtoMessage() {}
  63. func (*ReplyData) Descriptor() ([]byte, []int) {
  64. return fileDescriptor_c161fcfdc0c3ff1e, []int{1}
  65. }
  66. func (m *ReplyData) XXX_Unmarshal(b []byte) error {
  67. return xxx_messageInfo_ReplyData.Unmarshal(m, b)
  68. }
  69. func (m *ReplyData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  70. return xxx_messageInfo_ReplyData.Marshal(b, m, deterministic)
  71. }
  72. func (m *ReplyData) XXX_Merge(src proto.Message) {
  73. xxx_messageInfo_ReplyData.Merge(m, src)
  74. }
  75. func (m *ReplyData) XXX_Size() int {
  76. return xxx_messageInfo_ReplyData.Size(m)
  77. }
  78. func (m *ReplyData) XXX_DiscardUnknown() {
  79. xxx_messageInfo_ReplyData.DiscardUnknown(m)
  80. }
  81. var xxx_messageInfo_ReplyData proto.InternalMessageInfo
  82. func (m *ReplyData) GetOut() string {
  83. if m != nil {
  84. return m.Out
  85. }
  86. return ""
  87. }
  88. func init() {
  89. proto.RegisterType((*ReqData)(nil), "ReqData")
  90. proto.RegisterType((*ReplyData)(nil), "ReplyData")
  91. }
  92. func init() { proto.RegisterFile("test.proto", fileDescriptor_c161fcfdc0c3ff1e) }
  93. var fileDescriptor_c161fcfdc0c3ff1e = []byte{
  94. // 121 bytes of a gzipped FileDescriptorProto
  95. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x2d, 0x2e,
  96. 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x92, 0xe4, 0x62, 0x0f, 0x4a, 0x2d, 0x74, 0x49, 0x2c,
  97. 0x49, 0x14, 0xe2, 0xe3, 0x62, 0xf2, 0xcc, 0x93, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x62, 0xf2,
  98. 0xcc, 0x53, 0x92, 0xe5, 0xe2, 0x0c, 0x4a, 0x2d, 0xc8, 0xa9, 0x04, 0x4b, 0x0a, 0x70, 0x31, 0xfb,
  99. 0x97, 0x96, 0x40, 0x65, 0x41, 0x4c, 0x23, 0x5d, 0x2e, 0x96, 0x90, 0xd4, 0xe2, 0x12, 0x21, 0x55,
  100. 0x2e, 0x6e, 0x10, 0xed, 0x5a, 0x91, 0x9a, 0x5c, 0x5a, 0x92, 0x2a, 0xc4, 0xa1, 0x07, 0x35, 0x4f,
  101. 0x8a, 0x4b, 0x0f, 0xae, 0x5d, 0x89, 0x21, 0x89, 0x0d, 0x6c, 0x9f, 0x31, 0x20, 0x00, 0x00, 0xff,
  102. 0xff, 0x07, 0xf3, 0xcb, 0x37, 0x7d, 0x00, 0x00, 0x00,
  103. }
  104. // Reference imports to suppress errors if they are not otherwise used.
  105. var _ context.Context
  106. var _ grpc.ClientConn
  107. // This is a compile-time assertion to ensure that this generated file
  108. // is compatible with the grpc package it is being compiled against.
  109. const _ = grpc.SupportPackageIsVersion4
  110. // TestClient is the client API for Test service.
  111. //
  112. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  113. type TestClient interface {
  114. TestExecute(ctx context.Context, in *ReqData, opts ...grpc.CallOption) (*ReplyData, error)
  115. }
  116. type testClient struct {
  117. cc *grpc.ClientConn
  118. }
  119. func NewTestClient(cc *grpc.ClientConn) TestClient {
  120. return &testClient{cc}
  121. }
  122. func (c *testClient) TestExecute(ctx context.Context, in *ReqData, opts ...grpc.CallOption) (*ReplyData, error) {
  123. out := new(ReplyData)
  124. err := c.cc.Invoke(ctx, "/Test/TestExecute", in, out, opts...)
  125. if err != nil {
  126. return nil, err
  127. }
  128. return out, nil
  129. }
  130. // TestServer is the server API for Test service.
  131. type TestServer interface {
  132. TestExecute(context.Context, *ReqData) (*ReplyData, error)
  133. }
  134. func RegisterTestServer(s *grpc.Server, srv TestServer) {
  135. s.RegisterService(&_Test_serviceDesc, srv)
  136. }
  137. func _Test_TestExecute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  138. in := new(ReqData)
  139. if err := dec(in); err != nil {
  140. return nil, err
  141. }
  142. if interceptor == nil {
  143. return srv.(TestServer).TestExecute(ctx, in)
  144. }
  145. info := &grpc.UnaryServerInfo{
  146. Server: srv,
  147. FullMethod: "/Test/TestExecute",
  148. }
  149. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  150. return srv.(TestServer).TestExecute(ctx, req.(*ReqData))
  151. }
  152. return interceptor(ctx, in, info, handler)
  153. }
  154. var _Test_serviceDesc = grpc.ServiceDesc{
  155. ServiceName: "Test",
  156. HandlerType: (*TestServer)(nil),
  157. Methods: []grpc.MethodDesc{
  158. {
  159. MethodName: "TestExecute",
  160. Handler: _Test_TestExecute_Handler,
  161. },
  162. },
  163. Streams: []grpc.StreamDesc{},
  164. Metadata: "test.proto",
  165. }