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