You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

230 lines
8.2 KiB

8 years ago
  1. // Code generated by protoc-gen-go.
  2. // source: types.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package core_grpc is a generated protocol buffer package.
  6. It is generated from these files:
  7. types.proto
  8. It has these top-level messages:
  9. RequestPing
  10. RequestBroadcastTx
  11. ResponsePing
  12. ResponseBroadcastTx
  13. */
  14. package core_grpc
  15. import proto "github.com/golang/protobuf/proto"
  16. import fmt "fmt"
  17. import math "math"
  18. import types "github.com/tendermint/abci/types"
  19. import (
  20. "context"
  21. grpc "google.golang.org/grpc"
  22. )
  23. // Reference imports to suppress errors if they are not otherwise used.
  24. var _ = proto.Marshal
  25. var _ = fmt.Errorf
  26. var _ = math.Inf
  27. // This is a compile-time assertion to ensure that this generated file
  28. // is compatible with the proto package it is being compiled against.
  29. // A compilation error at this line likely means your copy of the
  30. // proto package needs to be updated.
  31. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  32. type RequestPing struct {
  33. }
  34. func (m *RequestPing) Reset() { *m = RequestPing{} }
  35. func (m *RequestPing) String() string { return proto.CompactTextString(m) }
  36. func (*RequestPing) ProtoMessage() {}
  37. func (*RequestPing) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  38. type RequestBroadcastTx struct {
  39. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  40. }
  41. func (m *RequestBroadcastTx) Reset() { *m = RequestBroadcastTx{} }
  42. func (m *RequestBroadcastTx) String() string { return proto.CompactTextString(m) }
  43. func (*RequestBroadcastTx) ProtoMessage() {}
  44. func (*RequestBroadcastTx) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  45. func (m *RequestBroadcastTx) GetTx() []byte {
  46. if m != nil {
  47. return m.Tx
  48. }
  49. return nil
  50. }
  51. type ResponsePing struct {
  52. }
  53. func (m *ResponsePing) Reset() { *m = ResponsePing{} }
  54. func (m *ResponsePing) String() string { return proto.CompactTextString(m) }
  55. func (*ResponsePing) ProtoMessage() {}
  56. func (*ResponsePing) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  57. type ResponseBroadcastTx struct {
  58. CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx" json:"check_tx,omitempty"`
  59. DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx" json:"deliver_tx,omitempty"`
  60. }
  61. func (m *ResponseBroadcastTx) Reset() { *m = ResponseBroadcastTx{} }
  62. func (m *ResponseBroadcastTx) String() string { return proto.CompactTextString(m) }
  63. func (*ResponseBroadcastTx) ProtoMessage() {}
  64. func (*ResponseBroadcastTx) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  65. func (m *ResponseBroadcastTx) GetCheckTx() *types.ResponseCheckTx {
  66. if m != nil {
  67. return m.CheckTx
  68. }
  69. return nil
  70. }
  71. func (m *ResponseBroadcastTx) GetDeliverTx() *types.ResponseDeliverTx {
  72. if m != nil {
  73. return m.DeliverTx
  74. }
  75. return nil
  76. }
  77. func init() {
  78. proto.RegisterType((*RequestPing)(nil), "core_grpc.RequestPing")
  79. proto.RegisterType((*RequestBroadcastTx)(nil), "core_grpc.RequestBroadcastTx")
  80. proto.RegisterType((*ResponsePing)(nil), "core_grpc.ResponsePing")
  81. proto.RegisterType((*ResponseBroadcastTx)(nil), "core_grpc.ResponseBroadcastTx")
  82. }
  83. // Reference imports to suppress errors if they are not otherwise used.
  84. var _ context.Context
  85. var _ grpc.ClientConn
  86. // This is a compile-time assertion to ensure that this generated file
  87. // is compatible with the grpc package it is being compiled against.
  88. const _ = grpc.SupportPackageIsVersion4
  89. // Client API for BroadcastAPI service
  90. type BroadcastAPIClient interface {
  91. Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error)
  92. BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error)
  93. }
  94. type broadcastAPIClient struct {
  95. cc *grpc.ClientConn
  96. }
  97. func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient {
  98. return &broadcastAPIClient{cc}
  99. }
  100. func (c *broadcastAPIClient) Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error) {
  101. out := new(ResponsePing)
  102. err := grpc.Invoke(ctx, "/core_grpc.BroadcastAPI/Ping", in, out, c.cc, opts...)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return out, nil
  107. }
  108. func (c *broadcastAPIClient) BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error) {
  109. out := new(ResponseBroadcastTx)
  110. err := grpc.Invoke(ctx, "/core_grpc.BroadcastAPI/BroadcastTx", in, out, c.cc, opts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return out, nil
  115. }
  116. // Server API for BroadcastAPI service
  117. type BroadcastAPIServer interface {
  118. Ping(context.Context, *RequestPing) (*ResponsePing, error)
  119. BroadcastTx(context.Context, *RequestBroadcastTx) (*ResponseBroadcastTx, error)
  120. }
  121. func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) {
  122. s.RegisterService(&_BroadcastAPI_serviceDesc, srv)
  123. }
  124. func _BroadcastAPI_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  125. in := new(RequestPing)
  126. if err := dec(in); err != nil {
  127. return nil, err
  128. }
  129. if interceptor == nil {
  130. return srv.(BroadcastAPIServer).Ping(ctx, in)
  131. }
  132. info := &grpc.UnaryServerInfo{
  133. Server: srv,
  134. FullMethod: "/core_grpc.BroadcastAPI/Ping",
  135. }
  136. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  137. return srv.(BroadcastAPIServer).Ping(ctx, req.(*RequestPing))
  138. }
  139. return interceptor(ctx, in, info, handler)
  140. }
  141. func _BroadcastAPI_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  142. in := new(RequestBroadcastTx)
  143. if err := dec(in); err != nil {
  144. return nil, err
  145. }
  146. if interceptor == nil {
  147. return srv.(BroadcastAPIServer).BroadcastTx(ctx, in)
  148. }
  149. info := &grpc.UnaryServerInfo{
  150. Server: srv,
  151. FullMethod: "/core_grpc.BroadcastAPI/BroadcastTx",
  152. }
  153. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  154. return srv.(BroadcastAPIServer).BroadcastTx(ctx, req.(*RequestBroadcastTx))
  155. }
  156. return interceptor(ctx, in, info, handler)
  157. }
  158. var _BroadcastAPI_serviceDesc = grpc.ServiceDesc{
  159. ServiceName: "core_grpc.BroadcastAPI",
  160. HandlerType: (*BroadcastAPIServer)(nil),
  161. Methods: []grpc.MethodDesc{
  162. {
  163. MethodName: "Ping",
  164. Handler: _BroadcastAPI_Ping_Handler,
  165. },
  166. {
  167. MethodName: "BroadcastTx",
  168. Handler: _BroadcastAPI_BroadcastTx_Handler,
  169. },
  170. },
  171. Streams: []grpc.StreamDesc{},
  172. Metadata: "types.proto",
  173. }
  174. func init() { proto.RegisterFile("types.proto", fileDescriptor0) }
  175. var fileDescriptor0 = []byte{
  176. // 264 bytes of a gzipped FileDescriptorProto
  177. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0xa9, 0x2c, 0x48,
  178. 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4c, 0xce, 0x2f, 0x4a, 0x8d, 0x4f, 0x2f,
  179. 0x2a, 0x48, 0x96, 0xd2, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f,
  180. 0x49, 0xcd, 0x4b, 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4c, 0x4a, 0xce, 0xd4, 0x07,
  181. 0x6b, 0xd1, 0x47, 0xd2, 0xa8, 0xc4, 0xcb, 0xc5, 0x1d, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0x12,
  182. 0x90, 0x99, 0x97, 0xae, 0xa4, 0xc2, 0x25, 0x04, 0xe5, 0x3a, 0x15, 0xe5, 0x27, 0xa6, 0x24, 0x27,
  183. 0x16, 0x97, 0x84, 0x54, 0x08, 0xf1, 0x71, 0x31, 0x95, 0x54, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0,
  184. 0x04, 0x31, 0x95, 0x54, 0x28, 0xf1, 0x71, 0xf1, 0x04, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7,
  185. 0x82, 0x75, 0x35, 0x32, 0x72, 0x09, 0xc3, 0x04, 0x90, 0xf5, 0x19, 0x72, 0x71, 0x24, 0x67, 0xa4,
  186. 0x26, 0x67, 0xc7, 0x43, 0x75, 0x73, 0x1b, 0x89, 0xe9, 0x41, 0x2c, 0x87, 0xa9, 0x76, 0x06, 0x49,
  187. 0x87, 0x54, 0x04, 0xb1, 0x27, 0x43, 0x18, 0x42, 0xe6, 0x5c, 0x5c, 0x29, 0xa9, 0x39, 0x99, 0x65,
  188. 0xa9, 0x45, 0x20, 0x4d, 0x4c, 0x60, 0x4d, 0x12, 0x68, 0x9a, 0x5c, 0x20, 0x0a, 0x42, 0x2a, 0x82,
  189. 0x38, 0x53, 0x60, 0x4c, 0xa3, 0xa9, 0x8c, 0x5c, 0x3c, 0x70, 0xbb, 0x1d, 0x03, 0x3c, 0x85, 0xcc,
  190. 0xb9, 0x58, 0x40, 0x8e, 0x13, 0x12, 0xd3, 0x83, 0x87, 0x8d, 0x1e, 0x92, 0x57, 0xa5, 0xc4, 0x51,
  191. 0xc4, 0x11, 0xbe, 0x11, 0xf2, 0xe1, 0xe2, 0x46, 0xf6, 0x84, 0x2c, 0xa6, 0x7e, 0x24, 0x69, 0x29,
  192. 0x39, 0x2c, 0xc6, 0x20, 0xc9, 0x27, 0xb1, 0x81, 0xc3, 0xd9, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
  193. 0x92, 0x29, 0xd9, 0x42, 0xaf, 0x01, 0x00, 0x00,
  194. }