github.com/prysmaticlabs/prysm@v1.4.4/proto/faucet/faucet.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.15.8 5 // source: src/proto/faucet.proto 6 7 package faucet 8 9 import ( 10 context "context" 11 reflect "reflect" 12 sync "sync" 13 14 proto "github.com/golang/protobuf/proto" 15 grpc "google.golang.org/grpc" 16 codes "google.golang.org/grpc/codes" 17 status "google.golang.org/grpc/status" 18 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 19 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 20 ) 21 22 const ( 23 // Verify that this generated code is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 25 // Verify that runtime/protoimpl is sufficiently up-to-date. 26 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 27 ) 28 29 // This is a compile-time assertion that a sufficiently up-to-date version 30 // of the legacy proto package is being used. 31 const _ = proto.ProtoPackageIsVersion4 32 33 type FundingRequest struct { 34 state protoimpl.MessageState 35 sizeCache protoimpl.SizeCache 36 unknownFields protoimpl.UnknownFields 37 38 WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` 39 RecaptchaSiteKey string `protobuf:"bytes,2,opt,name=recaptcha_site_key,json=recaptchaSiteKey,proto3" json:"recaptcha_site_key,omitempty"` 40 RecaptchaResponse string `protobuf:"bytes,3,opt,name=recaptcha_response,json=recaptchaResponse,proto3" json:"recaptcha_response,omitempty"` 41 } 42 43 func (x *FundingRequest) Reset() { 44 *x = FundingRequest{} 45 if protoimpl.UnsafeEnabled { 46 mi := &file_src_proto_faucet_proto_msgTypes[0] 47 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 48 ms.StoreMessageInfo(mi) 49 } 50 } 51 52 func (x *FundingRequest) String() string { 53 return protoimpl.X.MessageStringOf(x) 54 } 55 56 func (*FundingRequest) ProtoMessage() {} 57 58 func (x *FundingRequest) ProtoReflect() protoreflect.Message { 59 mi := &file_src_proto_faucet_proto_msgTypes[0] 60 if protoimpl.UnsafeEnabled && x != nil { 61 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 62 if ms.LoadMessageInfo() == nil { 63 ms.StoreMessageInfo(mi) 64 } 65 return ms 66 } 67 return mi.MessageOf(x) 68 } 69 70 // Deprecated: Use FundingRequest.ProtoReflect.Descriptor instead. 71 func (*FundingRequest) Descriptor() ([]byte, []int) { 72 return file_src_proto_faucet_proto_rawDescGZIP(), []int{0} 73 } 74 75 func (x *FundingRequest) GetWalletAddress() string { 76 if x != nil { 77 return x.WalletAddress 78 } 79 return "" 80 } 81 82 func (x *FundingRequest) GetRecaptchaSiteKey() string { 83 if x != nil { 84 return x.RecaptchaSiteKey 85 } 86 return "" 87 } 88 89 func (x *FundingRequest) GetRecaptchaResponse() string { 90 if x != nil { 91 return x.RecaptchaResponse 92 } 93 return "" 94 } 95 96 type FundingResponse struct { 97 state protoimpl.MessageState 98 sizeCache protoimpl.SizeCache 99 unknownFields protoimpl.UnknownFields 100 101 Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` 102 Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` 103 TransactionHash string `protobuf:"bytes,3,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"` 104 } 105 106 func (x *FundingResponse) Reset() { 107 *x = FundingResponse{} 108 if protoimpl.UnsafeEnabled { 109 mi := &file_src_proto_faucet_proto_msgTypes[1] 110 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 111 ms.StoreMessageInfo(mi) 112 } 113 } 114 115 func (x *FundingResponse) String() string { 116 return protoimpl.X.MessageStringOf(x) 117 } 118 119 func (*FundingResponse) ProtoMessage() {} 120 121 func (x *FundingResponse) ProtoReflect() protoreflect.Message { 122 mi := &file_src_proto_faucet_proto_msgTypes[1] 123 if protoimpl.UnsafeEnabled && x != nil { 124 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 125 if ms.LoadMessageInfo() == nil { 126 ms.StoreMessageInfo(mi) 127 } 128 return ms 129 } 130 return mi.MessageOf(x) 131 } 132 133 // Deprecated: Use FundingResponse.ProtoReflect.Descriptor instead. 134 func (*FundingResponse) Descriptor() ([]byte, []int) { 135 return file_src_proto_faucet_proto_rawDescGZIP(), []int{1} 136 } 137 138 func (x *FundingResponse) GetError() string { 139 if x != nil { 140 return x.Error 141 } 142 return "" 143 } 144 145 func (x *FundingResponse) GetAmount() string { 146 if x != nil { 147 return x.Amount 148 } 149 return "" 150 } 151 152 func (x *FundingResponse) GetTransactionHash() string { 153 if x != nil { 154 return x.TransactionHash 155 } 156 return "" 157 } 158 159 var File_src_proto_faucet_proto protoreflect.FileDescriptor 160 161 var file_src_proto_faucet_proto_rawDesc = []byte{ 162 0x0a, 0x16, 0x73, 0x72, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x66, 0x61, 0x75, 0x63, 163 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 164 0x22, 0x94, 0x01, 0x0a, 0x0e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 165 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 166 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x6c, 167 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 168 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x5f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 169 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 170 0x61, 0x53, 0x69, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x63, 0x61, 171 0x70, 0x74, 0x63, 0x68, 0x61, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 172 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 173 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x69, 174 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 175 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 176 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 177 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 178 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 179 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 180 0x73, 0x68, 0x32, 0x52, 0x0a, 0x0d, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 181 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x75, 182 0x6e, 0x64, 0x73, 0x12, 0x16, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x2e, 0x46, 0x75, 0x6e, 183 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x66, 0x61, 184 0x75, 0x63, 0x65, 0x74, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 185 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 186 } 187 188 var ( 189 file_src_proto_faucet_proto_rawDescOnce sync.Once 190 file_src_proto_faucet_proto_rawDescData = file_src_proto_faucet_proto_rawDesc 191 ) 192 193 func file_src_proto_faucet_proto_rawDescGZIP() []byte { 194 file_src_proto_faucet_proto_rawDescOnce.Do(func() { 195 file_src_proto_faucet_proto_rawDescData = protoimpl.X.CompressGZIP(file_src_proto_faucet_proto_rawDescData) 196 }) 197 return file_src_proto_faucet_proto_rawDescData 198 } 199 200 var file_src_proto_faucet_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 201 var file_src_proto_faucet_proto_goTypes = []interface{}{ 202 (*FundingRequest)(nil), // 0: faucet.FundingRequest 203 (*FundingResponse)(nil), // 1: faucet.FundingResponse 204 } 205 var file_src_proto_faucet_proto_depIdxs = []int32{ 206 0, // 0: faucet.FaucetService.RequestFunds:input_type -> faucet.FundingRequest 207 1, // 1: faucet.FaucetService.RequestFunds:output_type -> faucet.FundingResponse 208 1, // [1:2] is the sub-list for method output_type 209 0, // [0:1] is the sub-list for method input_type 210 0, // [0:0] is the sub-list for extension type_name 211 0, // [0:0] is the sub-list for extension extendee 212 0, // [0:0] is the sub-list for field type_name 213 } 214 215 func init() { file_src_proto_faucet_proto_init() } 216 func file_src_proto_faucet_proto_init() { 217 if File_src_proto_faucet_proto != nil { 218 return 219 } 220 if !protoimpl.UnsafeEnabled { 221 file_src_proto_faucet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 222 switch v := v.(*FundingRequest); i { 223 case 0: 224 return &v.state 225 case 1: 226 return &v.sizeCache 227 case 2: 228 return &v.unknownFields 229 default: 230 return nil 231 } 232 } 233 file_src_proto_faucet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 234 switch v := v.(*FundingResponse); i { 235 case 0: 236 return &v.state 237 case 1: 238 return &v.sizeCache 239 case 2: 240 return &v.unknownFields 241 default: 242 return nil 243 } 244 } 245 } 246 type x struct{} 247 out := protoimpl.TypeBuilder{ 248 File: protoimpl.DescBuilder{ 249 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 250 RawDescriptor: file_src_proto_faucet_proto_rawDesc, 251 NumEnums: 0, 252 NumMessages: 2, 253 NumExtensions: 0, 254 NumServices: 1, 255 }, 256 GoTypes: file_src_proto_faucet_proto_goTypes, 257 DependencyIndexes: file_src_proto_faucet_proto_depIdxs, 258 MessageInfos: file_src_proto_faucet_proto_msgTypes, 259 }.Build() 260 File_src_proto_faucet_proto = out.File 261 file_src_proto_faucet_proto_rawDesc = nil 262 file_src_proto_faucet_proto_goTypes = nil 263 file_src_proto_faucet_proto_depIdxs = nil 264 } 265 266 // Reference imports to suppress errors if they are not otherwise used. 267 var _ context.Context 268 var _ grpc.ClientConnInterface 269 270 // This is a compile-time assertion to ensure that this generated file 271 // is compatible with the grpc package it is being compiled against. 272 const _ = grpc.SupportPackageIsVersion6 273 274 // FaucetServiceClient is the client API for FaucetService service. 275 // 276 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 277 type FaucetServiceClient interface { 278 RequestFunds(ctx context.Context, in *FundingRequest, opts ...grpc.CallOption) (*FundingResponse, error) 279 } 280 281 type faucetServiceClient struct { 282 cc grpc.ClientConnInterface 283 } 284 285 func NewFaucetServiceClient(cc grpc.ClientConnInterface) FaucetServiceClient { 286 return &faucetServiceClient{cc} 287 } 288 289 func (c *faucetServiceClient) RequestFunds(ctx context.Context, in *FundingRequest, opts ...grpc.CallOption) (*FundingResponse, error) { 290 out := new(FundingResponse) 291 err := c.cc.Invoke(ctx, "/faucet.FaucetService/RequestFunds", in, out, opts...) 292 if err != nil { 293 return nil, err 294 } 295 return out, nil 296 } 297 298 // FaucetServiceServer is the server API for FaucetService service. 299 type FaucetServiceServer interface { 300 RequestFunds(context.Context, *FundingRequest) (*FundingResponse, error) 301 } 302 303 // UnimplementedFaucetServiceServer can be embedded to have forward compatible implementations. 304 type UnimplementedFaucetServiceServer struct { 305 } 306 307 func (*UnimplementedFaucetServiceServer) RequestFunds(context.Context, *FundingRequest) (*FundingResponse, error) { 308 return nil, status.Errorf(codes.Unimplemented, "method RequestFunds not implemented") 309 } 310 311 func RegisterFaucetServiceServer(s *grpc.Server, srv FaucetServiceServer) { 312 s.RegisterService(&_FaucetService_serviceDesc, srv) 313 } 314 315 func _FaucetService_RequestFunds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 316 in := new(FundingRequest) 317 if err := dec(in); err != nil { 318 return nil, err 319 } 320 if interceptor == nil { 321 return srv.(FaucetServiceServer).RequestFunds(ctx, in) 322 } 323 info := &grpc.UnaryServerInfo{ 324 Server: srv, 325 FullMethod: "/faucet.FaucetService/RequestFunds", 326 } 327 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 328 return srv.(FaucetServiceServer).RequestFunds(ctx, req.(*FundingRequest)) 329 } 330 return interceptor(ctx, in, info, handler) 331 } 332 333 var _FaucetService_serviceDesc = grpc.ServiceDesc{ 334 ServiceName: "faucet.FaucetService", 335 HandlerType: (*FaucetServiceServer)(nil), 336 Methods: []grpc.MethodDesc{ 337 { 338 MethodName: "RequestFunds", 339 Handler: _FaucetService_RequestFunds_Handler, 340 }, 341 }, 342 Streams: []grpc.StreamDesc{}, 343 Metadata: "src/proto/faucet.proto", 344 }