Documentation ¶
Index ¶
- Variables
- type Expectations
- type NodeSummary
- type Paystub
- type SatelliteSummary
- type Service
- func (service *Service) Expectations(ctx context.Context) (_ Expectations, err error)
- func (service *Service) GetAllNodesAllTimeEarned(ctx context.Context) (earned int64, err error)
- func (service *Service) GetAllNodesEarnedOnSatellite(ctx context.Context) (earned []SatelliteSummary, err error)
- func (service *Service) NodeExpectations(ctx context.Context, nodeID storj.NodeID) (_ Expectations, err error)
- func (service *Service) NodesPeriodSummary(ctx context.Context, period string) (_ Summary, err error)
- func (service *Service) NodesSatellitePeriodSummary(ctx context.Context, satelliteID storj.NodeID, period string) (_ Summary, err error)
- func (service *Service) NodesSatelliteSummary(ctx context.Context, satelliteID storj.NodeID) (_ Summary, err error)
- func (service *Service) NodesSummary(ctx context.Context) (_ Summary, err error)
- func (service *Service) Paystub(ctx context.Context, nodeID storj.NodeID) (_ Paystub, err error)
- func (service *Service) PaystubPeriod(ctx context.Context, period string, nodeID storj.NodeID) (_ Paystub, err error)
- func (service *Service) SatellitePaystub(ctx context.Context, nodeID, satelliteID storj.NodeID) (_ Paystub, err error)
- func (service *Service) SatellitePaystubPeriod(ctx context.Context, period string, nodeID, satelliteID storj.NodeID) (_ Paystub, err error)
- type Summary
Constants ¶
This section is empty.
Variables ¶
var ( // Error is an error class for payouts service error. Error = errs.Class("payouts") )
Functions ¶
This section is empty.
Types ¶
type Expectations ¶ added in v1.31.1
type Expectations struct { CurrentMonthEstimation int64 `json:"currentMonthEstimation"` Undistributed int64 `json:"undistributed"` }
Expectations contains estimated and undistributed payouts.
type NodeSummary ¶ added in v1.30.1
type NodeSummary struct { NodeID storj.NodeID `json:"nodeId"` NodeName string `json:"nodeName"` Held int64 `json:"held"` Paid int64 `json:"paid"` }
NodeSummary contains node's payout information.
type Paystub ¶ added in v1.31.1
type Paystub struct { UsageAtRest float64 `json:"usageAtRest"` UsageGet int64 `json:"usageGet"` UsageGetRepair int64 `json:"usageGetRepair"` UsageGetAudit int64 `json:"usageGetAudit"` CompAtRest int64 `json:"compAtRest"` CompGet int64 `json:"compGet"` CompGetRepair int64 `json:"compGetRepair"` CompGetAudit int64 `json:"compGetAudit"` Held int64 `json:"held"` Paid int64 `json:"paid"` Distributed int64 `json:"distributed"` }
Paystub is node payouts data for satellite by specific period.
type SatelliteSummary ¶
type SatelliteSummary struct { SatelliteID storj.NodeID `json:"satelliteID"` Earned int64 `json:"earned"` }
SatelliteSummary contains satellite id and earned amount.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service exposes all payouts related logic.
architecture: Service
func NewService ¶
NewService creates new instance of Service.
func (*Service) Expectations ¶ added in v1.31.1
func (service *Service) Expectations(ctx context.Context) (_ Expectations, err error)
Expectations returns all nodes estimated and undistributed earnings.
func (*Service) GetAllNodesAllTimeEarned ¶
GetAllNodesAllTimeEarned retrieves all nodes earned amount for all time.
func (*Service) GetAllNodesEarnedOnSatellite ¶
func (service *Service) GetAllNodesEarnedOnSatellite(ctx context.Context) (earned []SatelliteSummary, err error)
GetAllNodesEarnedOnSatellite retrieves all nodes earned amount for all time per satellite.
func (*Service) NodeExpectations ¶ added in v1.31.1
func (service *Service) NodeExpectations(ctx context.Context, nodeID storj.NodeID) (_ Expectations, err error)
NodeExpectations returns node's estimated and undistributed earnings.
func (*Service) NodesPeriodSummary ¶ added in v1.30.1
func (service *Service) NodesPeriodSummary(ctx context.Context, period string) (_ Summary, err error)
NodesPeriodSummary returns all satellites stats for specific period.
func (*Service) NodesSatellitePeriodSummary ¶ added in v1.31.1
func (service *Service) NodesSatellitePeriodSummary(ctx context.Context, satelliteID storj.NodeID, period string) (_ Summary, err error)
NodesSatellitePeriodSummary returns specific satellite stats for specific period.
func (*Service) NodesSatelliteSummary ¶ added in v1.31.1
func (service *Service) NodesSatelliteSummary(ctx context.Context, satelliteID storj.NodeID) (_ Summary, err error)
NodesSatelliteSummary returns specific satellite all time stats.
func (*Service) NodesSummary ¶ added in v1.30.1
NodesSummary returns all satellites all time stats.
func (*Service) PaystubPeriod ¶ added in v1.31.1
func (service *Service) PaystubPeriod(ctx context.Context, period string, nodeID storj.NodeID) (_ Paystub, err error)
PaystubPeriod returns all satellites paystub for specific period.