Documentation ¶
Overview ¶
Package faucet is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterFaucetHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFaucetHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaucetClient) error
- func RegisterFaucetHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFaucetHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaucetServer) error
- func RegisterFaucetServer(s *grpc.Server, srv FaucetServer)
- type FaucetClient
- type FaucetServer
- type FundingRequest
- func (*FundingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FundingRequest) GetCaptchaResponse() string
- func (x *FundingRequest) GetWalletAddress() string
- func (*FundingRequest) ProtoMessage()
- func (x *FundingRequest) ProtoReflect() protoreflect.Message
- func (x *FundingRequest) Reset()
- func (x *FundingRequest) String() string
- type FundingResponse
- func (*FundingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FundingResponse) GetAmount() string
- func (x *FundingResponse) GetTransactionHash() string
- func (*FundingResponse) ProtoMessage()
- func (x *FundingResponse) ProtoReflect() protoreflect.Message
- func (x *FundingResponse) Reset()
- func (x *FundingResponse) String() string
- type UnimplementedFaucetServer
- type UnsafeFaucetServer
Constants ¶
This section is empty.
Variables ¶
var File_faucet_faucet_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFaucetHandler ¶
RegisterFaucetHandler registers the http handlers for service Faucet to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFaucetHandlerClient ¶
func RegisterFaucetHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaucetClient) error
RegisterFaucetHandlerClient registers the http handlers for service Faucet to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FaucetClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FaucetClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FaucetClient" to call the correct interceptors.
func RegisterFaucetHandlerFromEndpoint ¶
func RegisterFaucetHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFaucetHandlerFromEndpoint is same as RegisterFaucetHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFaucetHandlerServer ¶
func RegisterFaucetHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaucetServer) error
RegisterFaucetHandlerServer registers the http handlers for service Faucet to "mux". UnaryRPC :call FaucetServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFaucetHandlerFromEndpoint instead.
func RegisterFaucetServer ¶
func RegisterFaucetServer(s *grpc.Server, srv FaucetServer)
Types ¶
type FaucetClient ¶
type FaucetClient interface {
RequestFunds(ctx context.Context, in *FundingRequest, opts ...grpc.CallOption) (*FundingResponse, error)
}
FaucetClient is the client API for Faucet service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFaucetClient ¶
func NewFaucetClient(cc grpc.ClientConnInterface) FaucetClient
type FaucetServer ¶
type FaucetServer interface { RequestFunds(context.Context, *FundingRequest) (*FundingResponse, error) // contains filtered or unexported methods }
FaucetServer is the server API for Faucet service. All implementations must embed UnimplementedFaucetServer for forward compatibility
type FundingRequest ¶
type FundingRequest struct { WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` CaptchaResponse string `protobuf:"bytes,2,opt,name=captcha_response,json=captchaResponse,proto3" json:"captcha_response,omitempty"` // contains filtered or unexported fields }
func (*FundingRequest) Descriptor
deprecated
func (*FundingRequest) Descriptor() ([]byte, []int)
Deprecated: Use FundingRequest.ProtoReflect.Descriptor instead.
func (*FundingRequest) GetCaptchaResponse ¶
func (x *FundingRequest) GetCaptchaResponse() string
func (*FundingRequest) GetWalletAddress ¶
func (x *FundingRequest) GetWalletAddress() string
func (*FundingRequest) ProtoMessage ¶
func (*FundingRequest) ProtoMessage()
func (*FundingRequest) ProtoReflect ¶
func (x *FundingRequest) ProtoReflect() protoreflect.Message
func (*FundingRequest) Reset ¶
func (x *FundingRequest) Reset()
func (*FundingRequest) String ¶
func (x *FundingRequest) String() string
type FundingResponse ¶
type FundingResponse struct { Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` TransactionHash string `protobuf:"bytes,2,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // contains filtered or unexported fields }
func (*FundingResponse) Descriptor
deprecated
func (*FundingResponse) Descriptor() ([]byte, []int)
Deprecated: Use FundingResponse.ProtoReflect.Descriptor instead.
func (*FundingResponse) GetAmount ¶
func (x *FundingResponse) GetAmount() string
func (*FundingResponse) GetTransactionHash ¶
func (x *FundingResponse) GetTransactionHash() string
func (*FundingResponse) ProtoMessage ¶
func (*FundingResponse) ProtoMessage()
func (*FundingResponse) ProtoReflect ¶
func (x *FundingResponse) ProtoReflect() protoreflect.Message
func (*FundingResponse) Reset ¶
func (x *FundingResponse) Reset()
func (*FundingResponse) String ¶
func (x *FundingResponse) String() string
type UnimplementedFaucetServer ¶
type UnimplementedFaucetServer struct { }
UnimplementedFaucetServer must be embedded to have forward compatible implementations.
func (UnimplementedFaucetServer) RequestFunds ¶
func (UnimplementedFaucetServer) RequestFunds(context.Context, *FundingRequest) (*FundingResponse, error)
type UnsafeFaucetServer ¶
type UnsafeFaucetServer interface {
// contains filtered or unexported methods
}
UnsafeFaucetServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FaucetServer will result in compilation errors.