deposit.pb.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.27.1
  4. // protoc v3.8.0
  5. // source: deposit.proto
  6. package mock
  7. import (
  8. context "context"
  9. reflect "reflect"
  10. sync "sync"
  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. )
  17. const (
  18. // Verify that this generated code is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  20. // Verify that runtime/protoimpl is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  22. )
  23. type DepositRequest struct {
  24. state protoimpl.MessageState
  25. sizeCache protoimpl.SizeCache
  26. unknownFields protoimpl.UnknownFields
  27. Amount float32 `protobuf:"fixed32,1,opt,name=amount,proto3" json:"amount,omitempty"`
  28. }
  29. func (x *DepositRequest) Reset() {
  30. *x = DepositRequest{}
  31. if protoimpl.UnsafeEnabled {
  32. mi := &file_deposit_proto_msgTypes[0]
  33. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  34. ms.StoreMessageInfo(mi)
  35. }
  36. }
  37. func (x *DepositRequest) String() string {
  38. return protoimpl.X.MessageStringOf(x)
  39. }
  40. func (*DepositRequest) ProtoMessage() {}
  41. func (x *DepositRequest) ProtoReflect() protoreflect.Message {
  42. mi := &file_deposit_proto_msgTypes[0]
  43. if protoimpl.UnsafeEnabled && x != nil {
  44. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  45. if ms.LoadMessageInfo() == nil {
  46. ms.StoreMessageInfo(mi)
  47. }
  48. return ms
  49. }
  50. return mi.MessageOf(x)
  51. }
  52. // Deprecated: Use DepositRequest.ProtoReflect.Descriptor instead.
  53. func (*DepositRequest) Descriptor() ([]byte, []int) {
  54. return file_deposit_proto_rawDescGZIP(), []int{0}
  55. }
  56. func (x *DepositRequest) GetAmount() float32 {
  57. if x != nil {
  58. return x.Amount
  59. }
  60. return 0
  61. }
  62. type DepositResponse struct {
  63. state protoimpl.MessageState
  64. sizeCache protoimpl.SizeCache
  65. unknownFields protoimpl.UnknownFields
  66. Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
  67. }
  68. func (x *DepositResponse) Reset() {
  69. *x = DepositResponse{}
  70. if protoimpl.UnsafeEnabled {
  71. mi := &file_deposit_proto_msgTypes[1]
  72. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  73. ms.StoreMessageInfo(mi)
  74. }
  75. }
  76. func (x *DepositResponse) String() string {
  77. return protoimpl.X.MessageStringOf(x)
  78. }
  79. func (*DepositResponse) ProtoMessage() {}
  80. func (x *DepositResponse) ProtoReflect() protoreflect.Message {
  81. mi := &file_deposit_proto_msgTypes[1]
  82. if protoimpl.UnsafeEnabled && x != nil {
  83. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  84. if ms.LoadMessageInfo() == nil {
  85. ms.StoreMessageInfo(mi)
  86. }
  87. return ms
  88. }
  89. return mi.MessageOf(x)
  90. }
  91. // Deprecated: Use DepositResponse.ProtoReflect.Descriptor instead.
  92. func (*DepositResponse) Descriptor() ([]byte, []int) {
  93. return file_deposit_proto_rawDescGZIP(), []int{1}
  94. }
  95. func (x *DepositResponse) GetOk() bool {
  96. if x != nil {
  97. return x.Ok
  98. }
  99. return false
  100. }
  101. var File_deposit_proto protoreflect.FileDescriptor
  102. var file_deposit_proto_rawDesc = []byte{
  103. 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
  104. 0x04, 0x6d, 0x6f, 0x63, 0x6b, 0x22, 0x28, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
  105. 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
  106. 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22,
  107. 0x21, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
  108. 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02,
  109. 0x6f, 0x6b, 0x32, 0x48, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x65, 0x72,
  110. 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12,
  111. 0x14, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65,
  112. 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x2e, 0x44, 0x65, 0x70,
  113. 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x08, 0x5a, 0x06,
  114. 0x2e, 0x3b, 0x6d, 0x6f, 0x63, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  115. }
  116. var (
  117. file_deposit_proto_rawDescOnce sync.Once
  118. file_deposit_proto_rawDescData = file_deposit_proto_rawDesc
  119. )
  120. func file_deposit_proto_rawDescGZIP() []byte {
  121. file_deposit_proto_rawDescOnce.Do(func() {
  122. file_deposit_proto_rawDescData = protoimpl.X.CompressGZIP(file_deposit_proto_rawDescData)
  123. })
  124. return file_deposit_proto_rawDescData
  125. }
  126. var (
  127. file_deposit_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  128. file_deposit_proto_goTypes = []any{
  129. (*DepositRequest)(nil), // 0: mock.DepositRequest
  130. (*DepositResponse)(nil), // 1: mock.DepositResponse
  131. }
  132. )
  133. var file_deposit_proto_depIdxs = []int32{
  134. 0, // 0: mock.DepositService.Deposit:input_type -> mock.DepositRequest
  135. 1, // 1: mock.DepositService.Deposit:output_type -> mock.DepositResponse
  136. 1, // [1:2] is the sub-list for method output_type
  137. 0, // [0:1] is the sub-list for method input_type
  138. 0, // [0:0] is the sub-list for extension type_name
  139. 0, // [0:0] is the sub-list for extension extendee
  140. 0, // [0:0] is the sub-list for field type_name
  141. }
  142. func init() { file_deposit_proto_init() }
  143. func file_deposit_proto_init() {
  144. if File_deposit_proto != nil {
  145. return
  146. }
  147. if !protoimpl.UnsafeEnabled {
  148. file_deposit_proto_msgTypes[0].Exporter = func(v any, i int) any {
  149. switch v := v.(*DepositRequest); i {
  150. case 0:
  151. return &v.state
  152. case 1:
  153. return &v.sizeCache
  154. case 2:
  155. return &v.unknownFields
  156. default:
  157. return nil
  158. }
  159. }
  160. file_deposit_proto_msgTypes[1].Exporter = func(v any, i int) any {
  161. switch v := v.(*DepositResponse); i {
  162. case 0:
  163. return &v.state
  164. case 1:
  165. return &v.sizeCache
  166. case 2:
  167. return &v.unknownFields
  168. default:
  169. return nil
  170. }
  171. }
  172. }
  173. type x struct{}
  174. out := protoimpl.TypeBuilder{
  175. File: protoimpl.DescBuilder{
  176. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  177. RawDescriptor: file_deposit_proto_rawDesc,
  178. NumEnums: 0,
  179. NumMessages: 2,
  180. NumExtensions: 0,
  181. NumServices: 1,
  182. },
  183. GoTypes: file_deposit_proto_goTypes,
  184. DependencyIndexes: file_deposit_proto_depIdxs,
  185. MessageInfos: file_deposit_proto_msgTypes,
  186. }.Build()
  187. File_deposit_proto = out.File
  188. file_deposit_proto_rawDesc = nil
  189. file_deposit_proto_goTypes = nil
  190. file_deposit_proto_depIdxs = nil
  191. }
  192. // Reference imports to suppress errors if they are not otherwise used.
  193. var (
  194. _ context.Context
  195. _ grpc.ClientConnInterface
  196. )
  197. // This is a compile-time assertion to ensure that this generated file
  198. // is compatible with the grpc package it is being compiled against.
  199. const _ = grpc.SupportPackageIsVersion6
  200. // DepositServiceClient is the client API for DepositService service.
  201. //
  202. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  203. type DepositServiceClient interface {
  204. Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositResponse, error)
  205. }
  206. type depositServiceClient struct {
  207. cc grpc.ClientConnInterface
  208. }
  209. func NewDepositServiceClient(cc grpc.ClientConnInterface) DepositServiceClient {
  210. return &depositServiceClient{cc}
  211. }
  212. func (c *depositServiceClient) Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositResponse, error) {
  213. out := new(DepositResponse)
  214. err := c.cc.Invoke(ctx, "/mock.DepositService/Deposit", in, out, opts...)
  215. if err != nil {
  216. return nil, err
  217. }
  218. return out, nil
  219. }
  220. // DepositServiceServer is the server API for DepositService service.
  221. type DepositServiceServer interface {
  222. Deposit(context.Context, *DepositRequest) (*DepositResponse, error)
  223. }
  224. // UnimplementedDepositServiceServer can be embedded to have forward compatible implementations.
  225. type UnimplementedDepositServiceServer struct{}
  226. func (*UnimplementedDepositServiceServer) Deposit(context.Context, *DepositRequest) (*DepositResponse, error) {
  227. return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented")
  228. }
  229. func RegisterDepositServiceServer(s *grpc.Server, srv DepositServiceServer) {
  230. s.RegisterService(&_DepositService_serviceDesc, srv)
  231. }
  232. func _DepositService_Deposit_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
  233. in := new(DepositRequest)
  234. if err := dec(in); err != nil {
  235. return nil, err
  236. }
  237. if interceptor == nil {
  238. return srv.(DepositServiceServer).Deposit(ctx, in)
  239. }
  240. info := &grpc.UnaryServerInfo{
  241. Server: srv,
  242. FullMethod: "/mock.DepositService/Deposit",
  243. }
  244. handler := func(ctx context.Context, req any) (any, error) {
  245. return srv.(DepositServiceServer).Deposit(ctx, req.(*DepositRequest))
  246. }
  247. return interceptor(ctx, in, info, handler)
  248. }
  249. var _DepositService_serviceDesc = grpc.ServiceDesc{
  250. ServiceName: "mock.DepositService",
  251. HandlerType: (*DepositServiceServer)(nil),
  252. Methods: []grpc.MethodDesc{
  253. {
  254. MethodName: "Deposit",
  255. Handler: _DepositService_Deposit_Handler,
  256. },
  257. },
  258. Streams: []grpc.StreamDesc{},
  259. Metadata: "deposit.proto",
  260. }