Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterStatisticServiceServer(s grpc.ServiceRegistrar, srv StatisticServiceServer)
- type GetPurchasedWorkResponse
- func (*GetPurchasedWorkResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPurchasedWorkResponse) GetPurchases() map[string]float32
- func (*GetPurchasedWorkResponse) ProtoMessage()
- func (x *GetPurchasedWorkResponse) ProtoReflect() protoreflect.Message
- func (x *GetPurchasedWorkResponse) Reset()
- func (x *GetPurchasedWorkResponse) String() string
- type LogType
- type PurchasedWorkStatistics
- func (*PurchasedWorkStatistics) Descriptor() ([]byte, []int)deprecated
- func (x *PurchasedWorkStatistics) GetTimestamp() *timestamppb.Timestamp
- func (x *PurchasedWorkStatistics) GetTxHash() string
- func (*PurchasedWorkStatistics) ProtoMessage()
- func (x *PurchasedWorkStatistics) ProtoReflect() protoreflect.Message
- func (x *PurchasedWorkStatistics) Reset()
- func (x *PurchasedWorkStatistics) String() string
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetAddress() string
- func (x *SearchRequest) GetLogType() LogType
- func (x *SearchRequest) GetSince() *timestamppb.Timestamp
- func (x *SearchRequest) GetUntil() *timestamppb.Timestamp
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- type StatisticServiceClient
- type StatisticServiceServer
- type Statistics
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetAmount() float64
- func (x *Transaction) GetBlockNumber() uint64
- func (x *Transaction) GetFrom() string
- func (x *Transaction) GetHash() string
- func (x *Transaction) GetTimestamp() *timestamppb.Timestamp
- func (x *Transaction) GetTo() string
- func (x *Transaction) GetType() LogType
- func (x *Transaction) GetWorkId() string
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type TransactionLog
- func (*TransactionLog) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionLog) GetAmount() string
- func (x *TransactionLog) GetBlockNumber() uint64
- func (x *TransactionLog) GetFrom() string
- func (x *TransactionLog) GetTimestamp() *timestamppb.Timestamp
- func (x *TransactionLog) GetTo() string
- func (x *TransactionLog) GetTransactionHash() string
- func (x *TransactionLog) GetType() LogType
- func (x *TransactionLog) GetWorkId() string
- func (*TransactionLog) ProtoMessage()
- func (x *TransactionLog) ProtoReflect() protoreflect.Message
- func (x *TransactionLog) Reset()
- func (x *TransactionLog) String() string
- type TransactionLogs
- type UnimplementedStatisticServiceServer
- func (UnimplementedStatisticServiceServer) GetPurchasedWork(context.Context, *WorkIDsList) (*GetPurchasedWorkResponse, error)
- func (UnimplementedStatisticServiceServer) GetStatistics(context.Context, *SearchRequest) (*Statistics, error)
- func (UnimplementedStatisticServiceServer) StoreBatchTransaction(context.Context, *TransactionLogs) (*emptypb.Empty, error)
- type UnsafeStatisticServiceServer
- type WorkIDsList
- func (*WorkIDsList) Descriptor() ([]byte, []int)deprecated
- func (x *WorkIDsList) GetSince() *timestamppb.Timestamp
- func (x *WorkIDsList) GetUntil() *timestamppb.Timestamp
- func (x *WorkIDsList) GetWorkIDs() []string
- func (*WorkIDsList) ProtoMessage()
- func (x *WorkIDsList) ProtoReflect() protoreflect.Message
- func (x *WorkIDsList) Reset()
- func (x *WorkIDsList) String() string
Constants ¶
const ( StatisticService_GetStatistics_FullMethodName = "/pp.statistics.StatisticService/GetStatistics" StatisticService_StoreBatchTransaction_FullMethodName = "/pp.statistics.StatisticService/StoreBatchTransaction" StatisticService_GetPurchasedWork_FullMethodName = "/pp.statistics.StatisticService/GetPurchasedWork" )
Variables ¶
var ( LogType_name = map[int32]string{ 0: "UNKNOWN", 1: "PURCHASED_WORK", 2: "CLAIM_REWARDS", } LogType_value = map[string]int32{ "UNKNOWN": 0, "PURCHASED_WORK": 1, "CLAIM_REWARDS": 2, } )
Enum value maps for LogType.
var File_statistics_srv_statistics_proto protoreflect.FileDescriptor
var StatisticService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pp.statistics.StatisticService", HandlerType: (*StatisticServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStatistics", Handler: _StatisticService_GetStatistics_Handler, }, { MethodName: "StoreBatchTransaction", Handler: _StatisticService_StoreBatchTransaction_Handler, }, { MethodName: "GetPurchasedWork", Handler: _StatisticService_GetPurchasedWork_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "statistics-srv/statistics.proto", }
StatisticService_ServiceDesc is the grpc.ServiceDesc for StatisticService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStatisticServiceServer ¶
func RegisterStatisticServiceServer(s grpc.ServiceRegistrar, srv StatisticServiceServer)
Types ¶
type GetPurchasedWorkResponse ¶
type GetPurchasedWorkResponse struct { Purchases map[string]float32 `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetPurchasedWorkResponse) Descriptor
deprecated
func (*GetPurchasedWorkResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPurchasedWorkResponse.ProtoReflect.Descriptor instead.
func (*GetPurchasedWorkResponse) GetPurchases ¶
func (x *GetPurchasedWorkResponse) GetPurchases() map[string]float32
func (*GetPurchasedWorkResponse) ProtoMessage ¶
func (*GetPurchasedWorkResponse) ProtoMessage()
func (*GetPurchasedWorkResponse) ProtoReflect ¶
func (x *GetPurchasedWorkResponse) ProtoReflect() protoreflect.Message
func (*GetPurchasedWorkResponse) Reset ¶
func (x *GetPurchasedWorkResponse) Reset()
func (*GetPurchasedWorkResponse) String ¶
func (x *GetPurchasedWorkResponse) String() string
type LogType ¶
type LogType int32
func StringToLogType ¶
func (LogType) Descriptor ¶
func (LogType) Descriptor() protoreflect.EnumDescriptor
func (LogType) EnumDescriptor
deprecated
func (LogType) Number ¶
func (x LogType) Number() protoreflect.EnumNumber
func (LogType) Type ¶
func (LogType) Type() protoreflect.EnumType
type PurchasedWorkStatistics ¶
type PurchasedWorkStatistics struct { Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` TxHash string `protobuf:"bytes,2,opt,name=txHash,proto3" json:"txHash,omitempty"` // contains filtered or unexported fields }
func (*PurchasedWorkStatistics) Descriptor
deprecated
func (*PurchasedWorkStatistics) Descriptor() ([]byte, []int)
Deprecated: Use PurchasedWorkStatistics.ProtoReflect.Descriptor instead.
func (*PurchasedWorkStatistics) GetTimestamp ¶
func (x *PurchasedWorkStatistics) GetTimestamp() *timestamppb.Timestamp
func (*PurchasedWorkStatistics) GetTxHash ¶
func (x *PurchasedWorkStatistics) GetTxHash() string
func (*PurchasedWorkStatistics) ProtoMessage ¶
func (*PurchasedWorkStatistics) ProtoMessage()
func (*PurchasedWorkStatistics) ProtoReflect ¶
func (x *PurchasedWorkStatistics) ProtoReflect() protoreflect.Message
func (*PurchasedWorkStatistics) Reset ¶
func (x *PurchasedWorkStatistics) Reset()
func (*PurchasedWorkStatistics) String ¶
func (x *PurchasedWorkStatistics) String() string
type SearchRequest ¶
type SearchRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Since *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=since,proto3" json:"since,omitempty"` Until *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=until,proto3" json:"until,omitempty"` LogType LogType `protobuf:"varint,4,opt,name=log_type,json=logType,proto3,enum=pp.statistics.LogType" json:"log_type,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetAddress ¶
func (x *SearchRequest) GetAddress() string
func (*SearchRequest) GetLogType ¶
func (x *SearchRequest) GetLogType() LogType
func (*SearchRequest) GetSince ¶
func (x *SearchRequest) GetSince() *timestamppb.Timestamp
func (*SearchRequest) GetUntil ¶
func (x *SearchRequest) GetUntil() *timestamppb.Timestamp
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type StatisticServiceClient ¶
type StatisticServiceClient interface { GetStatistics(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*Statistics, error) StoreBatchTransaction(ctx context.Context, in *TransactionLogs, opts ...grpc.CallOption) (*emptypb.Empty, error) GetPurchasedWork(ctx context.Context, in *WorkIDsList, opts ...grpc.CallOption) (*GetPurchasedWorkResponse, error) }
StatisticServiceClient is the client API for StatisticService 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 NewStatisticServiceClient ¶
func NewStatisticServiceClient(cc grpc.ClientConnInterface) StatisticServiceClient
type StatisticServiceServer ¶
type StatisticServiceServer interface { GetStatistics(context.Context, *SearchRequest) (*Statistics, error) StoreBatchTransaction(context.Context, *TransactionLogs) (*emptypb.Empty, error) GetPurchasedWork(context.Context, *WorkIDsList) (*GetPurchasedWorkResponse, error) // contains filtered or unexported methods }
StatisticServiceServer is the server API for StatisticService service. All implementations must embed UnimplementedStatisticServiceServer for forward compatibility
type Statistics ¶
type Statistics struct { Transactions []*Transaction `protobuf:"bytes,5,rep,name=transactions,proto3" json:"transactions,omitempty"` // contains filtered or unexported fields }
func (*Statistics) Descriptor
deprecated
func (*Statistics) Descriptor() ([]byte, []int)
Deprecated: Use Statistics.ProtoReflect.Descriptor instead.
func (*Statistics) GetTransactions ¶
func (x *Statistics) GetTransactions() []*Transaction
func (*Statistics) ProtoMessage ¶
func (*Statistics) ProtoMessage()
func (*Statistics) ProtoReflect ¶
func (x *Statistics) ProtoReflect() protoreflect.Message
func (*Statistics) Reset ¶
func (x *Statistics) Reset()
func (*Statistics) String ¶
func (x *Statistics) String() string
type Transaction ¶
type Transaction struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` Type LogType `protobuf:"varint,3,opt,name=type,proto3,enum=pp.statistics.LogType" json:"type,omitempty"` From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` WorkId *string `protobuf:"bytes,6,opt,name=work_id,json=workId,proto3,oneof" json:"work_id,omitempty"` Amount float64 `protobuf:"fixed64,7,opt,name=amount,proto3" json:"amount,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetAmount ¶
func (x *Transaction) GetAmount() float64
func (*Transaction) GetBlockNumber ¶
func (x *Transaction) GetBlockNumber() uint64
func (*Transaction) GetFrom ¶
func (x *Transaction) GetFrom() string
func (*Transaction) GetHash ¶
func (x *Transaction) GetHash() string
func (*Transaction) GetTimestamp ¶
func (x *Transaction) GetTimestamp() *timestamppb.Timestamp
func (*Transaction) GetTo ¶
func (x *Transaction) GetTo() string
func (*Transaction) GetType ¶
func (x *Transaction) GetType() LogType
func (*Transaction) GetWorkId ¶
func (x *Transaction) GetWorkId() string
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type TransactionLog ¶
type TransactionLog struct { BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` TransactionHash string `protobuf:"bytes,2,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` Type LogType `protobuf:"varint,3,opt,name=type,proto3,enum=pp.statistics.LogType" json:"type,omitempty"` From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` WorkId string `protobuf:"bytes,6,opt,name=work_id,json=workId,proto3" json:"work_id,omitempty"` Amount string `protobuf:"bytes,7,opt,name=amount,proto3" json:"amount,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*TransactionLog) Descriptor
deprecated
func (*TransactionLog) Descriptor() ([]byte, []int)
Deprecated: Use TransactionLog.ProtoReflect.Descriptor instead.
func (*TransactionLog) GetAmount ¶
func (x *TransactionLog) GetAmount() string
func (*TransactionLog) GetBlockNumber ¶
func (x *TransactionLog) GetBlockNumber() uint64
func (*TransactionLog) GetFrom ¶
func (x *TransactionLog) GetFrom() string
func (*TransactionLog) GetTimestamp ¶
func (x *TransactionLog) GetTimestamp() *timestamppb.Timestamp
func (*TransactionLog) GetTo ¶
func (x *TransactionLog) GetTo() string
func (*TransactionLog) GetTransactionHash ¶
func (x *TransactionLog) GetTransactionHash() string
func (*TransactionLog) GetType ¶
func (x *TransactionLog) GetType() LogType
func (*TransactionLog) GetWorkId ¶
func (x *TransactionLog) GetWorkId() string
func (*TransactionLog) ProtoMessage ¶
func (*TransactionLog) ProtoMessage()
func (*TransactionLog) ProtoReflect ¶
func (x *TransactionLog) ProtoReflect() protoreflect.Message
func (*TransactionLog) Reset ¶
func (x *TransactionLog) Reset()
func (*TransactionLog) String ¶
func (x *TransactionLog) String() string
type TransactionLogs ¶
type TransactionLogs struct { Logs []*TransactionLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` // contains filtered or unexported fields }
func (*TransactionLogs) Descriptor
deprecated
func (*TransactionLogs) Descriptor() ([]byte, []int)
Deprecated: Use TransactionLogs.ProtoReflect.Descriptor instead.
func (*TransactionLogs) GetLogs ¶
func (x *TransactionLogs) GetLogs() []*TransactionLog
func (*TransactionLogs) ProtoMessage ¶
func (*TransactionLogs) ProtoMessage()
func (*TransactionLogs) ProtoReflect ¶
func (x *TransactionLogs) ProtoReflect() protoreflect.Message
func (*TransactionLogs) Reset ¶
func (x *TransactionLogs) Reset()
func (*TransactionLogs) String ¶
func (x *TransactionLogs) String() string
type UnimplementedStatisticServiceServer ¶
type UnimplementedStatisticServiceServer struct { }
UnimplementedStatisticServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedStatisticServiceServer) GetPurchasedWork ¶
func (UnimplementedStatisticServiceServer) GetPurchasedWork(context.Context, *WorkIDsList) (*GetPurchasedWorkResponse, error)
func (UnimplementedStatisticServiceServer) GetStatistics ¶
func (UnimplementedStatisticServiceServer) GetStatistics(context.Context, *SearchRequest) (*Statistics, error)
func (UnimplementedStatisticServiceServer) StoreBatchTransaction ¶
func (UnimplementedStatisticServiceServer) StoreBatchTransaction(context.Context, *TransactionLogs) (*emptypb.Empty, error)
type UnsafeStatisticServiceServer ¶
type UnsafeStatisticServiceServer interface {
// contains filtered or unexported methods
}
UnsafeStatisticServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StatisticServiceServer will result in compilation errors.
type WorkIDsList ¶
type WorkIDsList struct { WorkIDs []string `protobuf:"bytes,1,rep,name=workIDs,proto3" json:"workIDs,omitempty"` Since *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=since,proto3" json:"since,omitempty"` Until *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=until,proto3" json:"until,omitempty"` // contains filtered or unexported fields }
func (*WorkIDsList) Descriptor
deprecated
func (*WorkIDsList) Descriptor() ([]byte, []int)
Deprecated: Use WorkIDsList.ProtoReflect.Descriptor instead.
func (*WorkIDsList) GetSince ¶
func (x *WorkIDsList) GetSince() *timestamppb.Timestamp
func (*WorkIDsList) GetUntil ¶
func (x *WorkIDsList) GetUntil() *timestamppb.Timestamp
func (*WorkIDsList) GetWorkIDs ¶
func (x *WorkIDsList) GetWorkIDs() []string
func (*WorkIDsList) ProtoMessage ¶
func (*WorkIDsList) ProtoMessage()
func (*WorkIDsList) ProtoReflect ¶
func (x *WorkIDsList) ProtoReflect() protoreflect.Message
func (*WorkIDsList) Reset ¶
func (x *WorkIDsList) Reset()
func (*WorkIDsList) String ¶
func (x *WorkIDsList) String() string