deposit.pb.go 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. // Code generated by protoc-gen-go.
  2. // source: deposit.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package mock is a generated protocol buffer package.
  6. It is generated from these files:
  7. deposit.proto
  8. It has these top-level messages:
  9. DepositRequest
  10. DepositResponse
  11. */
  12. package mock
  13. import (
  14. proto "github.com/golang/protobuf/proto"
  15. fmt "fmt"
  16. math "math"
  17. )
  18. import (
  19. context "golang.org/x/net/context"
  20. grpc "google.golang.org/grpc"
  21. )
  22. // Reference imports to suppress errors if they are not otherwise used.
  23. var (
  24. _ = proto.Marshal
  25. _ = fmt.Errorf
  26. _ = math.Inf
  27. )
  28. // This is a compile-time assertion to ensure that this generated file
  29. // is compatible with the proto package it is being compiled against.
  30. // A compilation error at this line likely means your copy of the
  31. // proto package needs to be updated.
  32. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  33. type DepositRequest struct {
  34. Amount float32 `protobuf:"fixed32,1,opt,name=amount" json:"amount,omitempty"`
  35. }
  36. func (m *DepositRequest) Reset() { *m = DepositRequest{} }
  37. func (m *DepositRequest) String() string { return proto.CompactTextString(m) }
  38. func (*DepositRequest) ProtoMessage() {}
  39. func (*DepositRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  40. func (m *DepositRequest) GetAmount() float32 {
  41. if m != nil {
  42. return m.Amount
  43. }
  44. return 0
  45. }
  46. type DepositResponse struct {
  47. Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
  48. }
  49. func (m *DepositResponse) Reset() { *m = DepositResponse{} }
  50. func (m *DepositResponse) String() string { return proto.CompactTextString(m) }
  51. func (*DepositResponse) ProtoMessage() {}
  52. func (*DepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  53. func (m *DepositResponse) GetOk() bool {
  54. if m != nil {
  55. return m.Ok
  56. }
  57. return false
  58. }
  59. func init() {
  60. proto.RegisterType((*DepositRequest)(nil), "mock.DepositRequest")
  61. proto.RegisterType((*DepositResponse)(nil), "mock.DepositResponse")
  62. }
  63. // Reference imports to suppress errors if they are not otherwise used.
  64. var (
  65. _ context.Context
  66. _ grpc.ClientConn
  67. )
  68. // This is a compile-time assertion to ensure that this generated file
  69. // is compatible with the grpc package it is being compiled against.
  70. const _ = grpc.SupportPackageIsVersion4
  71. // Client API for DepositService service
  72. type DepositServiceClient interface {
  73. Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositResponse, error)
  74. }
  75. type depositServiceClient struct {
  76. cc *grpc.ClientConn
  77. }
  78. func NewDepositServiceClient(cc *grpc.ClientConn) DepositServiceClient {
  79. return &depositServiceClient{cc}
  80. }
  81. func (c *depositServiceClient) Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositResponse, error) {
  82. out := new(DepositResponse)
  83. err := grpc.Invoke(ctx, "/mock.DepositService/Deposit", in, out, c.cc, opts...)
  84. if err != nil {
  85. return nil, err
  86. }
  87. return out, nil
  88. }
  89. // Server API for DepositService service
  90. type DepositServiceServer interface {
  91. Deposit(context.Context, *DepositRequest) (*DepositResponse, error)
  92. }
  93. func RegisterDepositServiceServer(s *grpc.Server, srv DepositServiceServer) {
  94. s.RegisterService(&_DepositService_serviceDesc, srv)
  95. }
  96. func _DepositService_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  97. in := new(DepositRequest)
  98. if err := dec(in); err != nil {
  99. return nil, err
  100. }
  101. if interceptor == nil {
  102. return srv.(DepositServiceServer).Deposit(ctx, in)
  103. }
  104. info := &grpc.UnaryServerInfo{
  105. Server: srv,
  106. FullMethod: "/mock.DepositService/Deposit",
  107. }
  108. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  109. return srv.(DepositServiceServer).Deposit(ctx, req.(*DepositRequest))
  110. }
  111. return interceptor(ctx, in, info, handler)
  112. }
  113. var _DepositService_serviceDesc = grpc.ServiceDesc{
  114. ServiceName: "mock.DepositService",
  115. HandlerType: (*DepositServiceServer)(nil),
  116. Methods: []grpc.MethodDesc{
  117. {
  118. MethodName: "Deposit",
  119. Handler: _DepositService_Deposit_Handler,
  120. },
  121. },
  122. Streams: []grpc.StreamDesc{},
  123. Metadata: "deposit.proto",
  124. }
  125. func init() { proto.RegisterFile("deposit.proto", fileDescriptor0) }
  126. var fileDescriptor0 = []byte{
  127. // 139 bytes of a gzipped FileDescriptorProto
  128. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0x49, 0x2d, 0xc8,
  129. 0x2f, 0xce, 0x2c, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0xcd, 0x4f, 0xce, 0x56,
  130. 0xd2, 0xe0, 0xe2, 0x73, 0x81, 0x08, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x89, 0x71,
  131. 0xb1, 0x25, 0xe6, 0xe6, 0x97, 0xe6, 0x95, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x05, 0x41, 0x79,
  132. 0x4a, 0x8a, 0x5c, 0xfc, 0x70, 0x95, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x42, 0x7c, 0x5c, 0x4c,
  133. 0xf9, 0xd9, 0x60, 0x65, 0x1c, 0x41, 0x4c, 0xf9, 0xd9, 0x46, 0x1e, 0x70, 0xc3, 0x82, 0x53, 0x8b,
  134. 0xca, 0x32, 0x93, 0x53, 0x85, 0xcc, 0xb8, 0xd8, 0xa1, 0x22, 0x42, 0x22, 0x7a, 0x20, 0x0b, 0xf5,
  135. 0x50, 0x6d, 0x93, 0x12, 0x45, 0x13, 0x85, 0x98, 0x9c, 0xc4, 0x06, 0x76, 0xa3, 0x31, 0x20, 0x00,
  136. 0x00, 0xff, 0xff, 0x62, 0x37, 0xf2, 0x36, 0xb4, 0x00, 0x00, 0x00,
  137. }