Documentation ¶
Overview ¶
Package faucet is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterFaucetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFaucetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaucetServiceClient) error
- func RegisterFaucetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFaucetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaucetServiceServer) error
- func RegisterFaucetServiceServer(s *grpc.Server, srv FaucetServiceServer)
- type ClaimRequest
- func (*ClaimRequest) Descriptor() ([]byte, []int)
- func (m *ClaimRequest) GetType() Payment.CryptoType
- func (m *ClaimRequest) Marshal() (dAtA []byte, err error)
- func (m *ClaimRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ClaimRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClaimRequest) ProtoMessage()
- func (m *ClaimRequest) Reset()
- func (m *ClaimRequest) Size() (n int)
- func (m *ClaimRequest) String() string
- func (m *ClaimRequest) Unmarshal(dAtA []byte) error
- func (this *ClaimRequest) Validate() error
- func (m *ClaimRequest) XXX_DiscardUnknown()
- func (m *ClaimRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClaimRequest) XXX_Merge(src proto.Message)
- func (*ClaimRequest) XXX_MessageName() string
- func (m *ClaimRequest) XXX_Size() int
- func (m *ClaimRequest) XXX_Unmarshal(b []byte) error
- type EmptyRequest
- func (*EmptyRequest) Descriptor() ([]byte, []int)
- func (m *EmptyRequest) Marshal() (dAtA []byte, err error)
- func (m *EmptyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *EmptyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EmptyRequest) ProtoMessage()
- func (m *EmptyRequest) Reset()
- func (m *EmptyRequest) Size() (n int)
- func (m *EmptyRequest) String() string
- func (m *EmptyRequest) Unmarshal(dAtA []byte) error
- func (this *EmptyRequest) Validate() error
- func (m *EmptyRequest) XXX_DiscardUnknown()
- func (m *EmptyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyRequest) XXX_Merge(src proto.Message)
- func (*EmptyRequest) XXX_MessageName() string
- func (m *EmptyRequest) XXX_Size() int
- func (m *EmptyRequest) XXX_Unmarshal(b []byte) error
- type FaucetServiceClient
- type FaucetServiceServer
- type HistoryDTO
- func (*HistoryDTO) Descriptor() ([]byte, []int)
- func (m *HistoryDTO) GetAmount() float64
- func (m *HistoryDTO) GetTimestamp() *types.Timestamp
- func (m *HistoryDTO) Marshal() (dAtA []byte, err error)
- func (m *HistoryDTO) MarshalTo(dAtA []byte) (int, error)
- func (m *HistoryDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HistoryDTO) ProtoMessage()
- func (m *HistoryDTO) Reset()
- func (m *HistoryDTO) Size() (n int)
- func (m *HistoryDTO) String() string
- func (m *HistoryDTO) Unmarshal(dAtA []byte) error
- func (this *HistoryDTO) Validate() error
- func (m *HistoryDTO) XXX_DiscardUnknown()
- func (m *HistoryDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HistoryDTO) XXX_Merge(src proto.Message)
- func (*HistoryDTO) XXX_MessageName() string
- func (m *HistoryDTO) XXX_Size() int
- func (m *HistoryDTO) XXX_Unmarshal(b []byte) error
- type PlayerDTO
- func (*PlayerDTO) Descriptor() ([]byte, []int)
- func (m *PlayerDTO) GetBonusAmountPct() uint32
- func (m *PlayerDTO) GetEntityID() string
- func (m *PlayerDTO) GetHistories() []*HistoryDTO
- func (m *PlayerDTO) GetLastClaim() *types.Timestamp
- func (m *PlayerDTO) GetReferalClaimAmount() float64
- func (m *PlayerDTO) GetReferalCount() uint64
- func (m *PlayerDTO) GetReferalID() uint64
- func (m *PlayerDTO) GetType() Payment.CryptoType
- func (m *PlayerDTO) Marshal() (dAtA []byte, err error)
- func (m *PlayerDTO) MarshalTo(dAtA []byte) (int, error)
- func (m *PlayerDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PlayerDTO) ProtoMessage()
- func (m *PlayerDTO) Reset()
- func (m *PlayerDTO) Size() (n int)
- func (m *PlayerDTO) String() string
- func (m *PlayerDTO) Unmarshal(dAtA []byte) error
- func (this *PlayerDTO) Validate() error
- func (m *PlayerDTO) XXX_DiscardUnknown()
- func (m *PlayerDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PlayerDTO) XXX_Merge(src proto.Message)
- func (*PlayerDTO) XXX_MessageName() string
- func (m *PlayerDTO) XXX_Size() int
- func (m *PlayerDTO) XXX_Unmarshal(b []byte) error
- type UnimplementedFaucetServiceServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterFaucetServiceHandler ¶
func RegisterFaucetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterFaucetServiceHandler registers the http handlers for service FaucetService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFaucetServiceHandlerClient ¶
func RegisterFaucetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaucetServiceClient) error
RegisterFaucetServiceHandlerClient registers the http handlers for service FaucetService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FaucetServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FaucetServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FaucetServiceClient" to call the correct interceptors.
func RegisterFaucetServiceHandlerFromEndpoint ¶
func RegisterFaucetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFaucetServiceHandlerFromEndpoint is same as RegisterFaucetServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFaucetServiceHandlerServer ¶
func RegisterFaucetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaucetServiceServer) error
RegisterFaucetServiceHandlerServer registers the http handlers for service FaucetService to "mux". UnaryRPC :call FaucetServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterFaucetServiceServer ¶
func RegisterFaucetServiceServer(s *grpc.Server, srv FaucetServiceServer)
Types ¶
type ClaimRequest ¶
type ClaimRequest struct { Type Payment.CryptoType `protobuf:"varint,1,opt,name=Type,proto3,enum=payment.CryptoType" json:"Type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClaimRequest) Descriptor ¶
func (*ClaimRequest) Descriptor() ([]byte, []int)
func (*ClaimRequest) GetType ¶
func (m *ClaimRequest) GetType() Payment.CryptoType
func (*ClaimRequest) Marshal ¶
func (m *ClaimRequest) Marshal() (dAtA []byte, err error)
func (*ClaimRequest) MarshalToSizedBuffer ¶
func (m *ClaimRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClaimRequest) ProtoMessage ¶
func (*ClaimRequest) ProtoMessage()
func (*ClaimRequest) Reset ¶
func (m *ClaimRequest) Reset()
func (*ClaimRequest) Size ¶
func (m *ClaimRequest) Size() (n int)
func (*ClaimRequest) String ¶
func (m *ClaimRequest) String() string
func (*ClaimRequest) Unmarshal ¶
func (m *ClaimRequest) Unmarshal(dAtA []byte) error
func (*ClaimRequest) Validate ¶
func (this *ClaimRequest) Validate() error
func (*ClaimRequest) XXX_DiscardUnknown ¶
func (m *ClaimRequest) XXX_DiscardUnknown()
func (*ClaimRequest) XXX_Marshal ¶
func (m *ClaimRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClaimRequest) XXX_Merge ¶
func (m *ClaimRequest) XXX_Merge(src proto.Message)
func (*ClaimRequest) XXX_MessageName ¶
func (*ClaimRequest) XXX_MessageName() string
func (*ClaimRequest) XXX_Size ¶
func (m *ClaimRequest) XXX_Size() int
func (*ClaimRequest) XXX_Unmarshal ¶
func (m *ClaimRequest) XXX_Unmarshal(b []byte) error
type EmptyRequest ¶
type EmptyRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EmptyRequest) Descriptor ¶
func (*EmptyRequest) Descriptor() ([]byte, []int)
func (*EmptyRequest) Marshal ¶
func (m *EmptyRequest) Marshal() (dAtA []byte, err error)
func (*EmptyRequest) MarshalToSizedBuffer ¶
func (m *EmptyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EmptyRequest) ProtoMessage ¶
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) Reset ¶
func (m *EmptyRequest) Reset()
func (*EmptyRequest) Size ¶
func (m *EmptyRequest) Size() (n int)
func (*EmptyRequest) String ¶
func (m *EmptyRequest) String() string
func (*EmptyRequest) Unmarshal ¶
func (m *EmptyRequest) Unmarshal(dAtA []byte) error
func (*EmptyRequest) Validate ¶
func (this *EmptyRequest) Validate() error
func (*EmptyRequest) XXX_DiscardUnknown ¶
func (m *EmptyRequest) XXX_DiscardUnknown()
func (*EmptyRequest) XXX_Marshal ¶
func (m *EmptyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EmptyRequest) XXX_Merge ¶
func (m *EmptyRequest) XXX_Merge(src proto.Message)
func (*EmptyRequest) XXX_MessageName ¶
func (*EmptyRequest) XXX_MessageName() string
func (*EmptyRequest) XXX_Size ¶
func (m *EmptyRequest) XXX_Size() int
func (*EmptyRequest) XXX_Unmarshal ¶
func (m *EmptyRequest) XXX_Unmarshal(b []byte) error
type FaucetServiceClient ¶
type FaucetServiceClient interface { GetPlayer(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*PlayerDTO, error) Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimRequest, error) }
FaucetServiceClient is the client API for FaucetService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFaucetServiceClient ¶
func NewFaucetServiceClient(cc *grpc.ClientConn) FaucetServiceClient
type FaucetServiceServer ¶
type FaucetServiceServer interface { GetPlayer(context.Context, *EmptyRequest) (*PlayerDTO, error) Claim(context.Context, *ClaimRequest) (*ClaimRequest, error) }
FaucetServiceServer is the server API for FaucetService service.
type HistoryDTO ¶
type HistoryDTO struct { Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` Amount float64 `protobuf:"fixed64,2,opt,name=Amount,proto3" json:"Amount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HistoryDTO) Descriptor ¶
func (*HistoryDTO) Descriptor() ([]byte, []int)
func (*HistoryDTO) GetAmount ¶
func (m *HistoryDTO) GetAmount() float64
func (*HistoryDTO) GetTimestamp ¶
func (m *HistoryDTO) GetTimestamp() *types.Timestamp
func (*HistoryDTO) Marshal ¶
func (m *HistoryDTO) Marshal() (dAtA []byte, err error)
func (*HistoryDTO) MarshalToSizedBuffer ¶
func (m *HistoryDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HistoryDTO) ProtoMessage ¶
func (*HistoryDTO) ProtoMessage()
func (*HistoryDTO) Reset ¶
func (m *HistoryDTO) Reset()
func (*HistoryDTO) Size ¶
func (m *HistoryDTO) Size() (n int)
func (*HistoryDTO) String ¶
func (m *HistoryDTO) String() string
func (*HistoryDTO) Unmarshal ¶
func (m *HistoryDTO) Unmarshal(dAtA []byte) error
func (*HistoryDTO) Validate ¶
func (this *HistoryDTO) Validate() error
func (*HistoryDTO) XXX_DiscardUnknown ¶
func (m *HistoryDTO) XXX_DiscardUnknown()
func (*HistoryDTO) XXX_Marshal ¶
func (m *HistoryDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HistoryDTO) XXX_Merge ¶
func (m *HistoryDTO) XXX_Merge(src proto.Message)
func (*HistoryDTO) XXX_MessageName ¶
func (*HistoryDTO) XXX_MessageName() string
func (*HistoryDTO) XXX_Size ¶
func (m *HistoryDTO) XXX_Size() int
func (*HistoryDTO) XXX_Unmarshal ¶
func (m *HistoryDTO) XXX_Unmarshal(b []byte) error
type PlayerDTO ¶
type PlayerDTO struct { EntityID string `protobuf:"bytes,1,opt,name=EntityID,proto3" json:"EntityID,omitempty"` Type Payment.CryptoType `protobuf:"varint,2,opt,name=Type,proto3,enum=payment.CryptoType" json:"Type,omitempty"` ReferalID uint64 `protobuf:"varint,3,opt,name=ReferalID,proto3" json:"ReferalID,omitempty"` LastClaim *types.Timestamp `protobuf:"bytes,11,opt,name=LastClaim,proto3" json:"LastClaim,omitempty"` BonusAmountPct uint32 `protobuf:"varint,12,opt,name=BonusAmountPct,proto3" json:"BonusAmountPct,omitempty"` ReferalCount uint64 `protobuf:"varint,31,opt,name=ReferalCount,proto3" json:"ReferalCount,omitempty"` ReferalClaimAmount float64 `protobuf:"fixed64,32,opt,name=ReferalClaimAmount,proto3" json:"ReferalClaimAmount,omitempty"` Histories []*HistoryDTO `protobuf:"bytes,51,rep,name=Histories,proto3" json:"Histories,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PlayerDTO) Descriptor ¶
func (*PlayerDTO) GetBonusAmountPct ¶
func (*PlayerDTO) GetEntityID ¶
func (*PlayerDTO) GetHistories ¶
func (m *PlayerDTO) GetHistories() []*HistoryDTO
func (*PlayerDTO) GetLastClaim ¶
func (*PlayerDTO) GetReferalClaimAmount ¶
func (*PlayerDTO) GetReferalCount ¶
func (*PlayerDTO) GetReferalID ¶
func (*PlayerDTO) GetType ¶
func (m *PlayerDTO) GetType() Payment.CryptoType
func (*PlayerDTO) MarshalToSizedBuffer ¶
func (*PlayerDTO) ProtoMessage ¶
func (*PlayerDTO) ProtoMessage()
func (*PlayerDTO) XXX_DiscardUnknown ¶
func (m *PlayerDTO) XXX_DiscardUnknown()
func (*PlayerDTO) XXX_Marshal ¶
func (*PlayerDTO) XXX_MessageName ¶
func (*PlayerDTO) XXX_Unmarshal ¶
type UnimplementedFaucetServiceServer ¶
type UnimplementedFaucetServiceServer struct { }
UnimplementedFaucetServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedFaucetServiceServer) Claim ¶
func (*UnimplementedFaucetServiceServer) Claim(ctx context.Context, req *ClaimRequest) (*ClaimRequest, error)
func (*UnimplementedFaucetServiceServer) GetPlayer ¶
func (*UnimplementedFaucetServiceServer) GetPlayer(ctx context.Context, req *EmptyRequest) (*PlayerDTO, error)