Documentation ¶
Index ¶
- Variables
- type Expectations
- type HeldAmount
- type HeldAmountHistory
- type HeldAmountSummary
- type NodeSummary
- type Paystub
- type SatelliteSummary
- type Service
- func (service *Service) Earned(ctx context.Context) (earned int64, err error)
- func (service *Service) EarnedSatellite(ctx context.Context) (earned []SatelliteSummary, err error)
- func (service *Service) Expectations(ctx context.Context) (_ Expectations, err error)
- func (service *Service) HeldAmountSummary(ctx context.Context, nodeID storj.NodeID) (_ []HeldAmountSummary, err error)
- func (service *Service) NodeExpectations(ctx context.Context, nodeID storj.NodeID) (_ Expectations, 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) PaystubSatellite(ctx context.Context, nodeID, satelliteID storj.NodeID) (_ Paystub, err error)
- func (service *Service) PaystubSatellitePeriod(ctx context.Context, period string, nodeID, satelliteID storj.NodeID) (_ Paystub, err error)
- func (service *Service) Summary(ctx context.Context) (_ Summary, err error)
- func (service *Service) SummaryPeriod(ctx context.Context, period string) (_ Summary, err error)
- func (service *Service) SummarySatellite(ctx context.Context, satelliteID storj.NodeID) (_ Summary, err error)
- func (service *Service) SummarySatellitePeriod(ctx context.Context, satelliteID storj.NodeID, period string) (_ Summary, 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 HeldAmount ¶ added in v1.32.1
HeldAmount contains amount held for period.
type HeldAmountHistory ¶ added in v1.32.1
type HeldAmountHistory struct { SatelliteID storj.NodeID `json:"satelliteId"` HeldAmounts []HeldAmount `json:"heldAmounts"` }
HeldAmountHistory contains held amount history of particular satellite.
type HeldAmountSummary ¶ added in v1.32.1
type HeldAmountSummary struct { SatelliteID storj.NodeID `json:"satelliteId"` SatelliteURL storj.NodeURL `json:"satelliteUrl"` FirstQuarter int64 `json:"firstQuarter"` SecondQuarter int64 `json:"secondQuarter"` ThirdQuarter int64 `json:"thirdQuarter"` PeriodCount int `json:"periodCount"` }
HeldAmountSummary contains held amount summary for first 3 quarters.
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"` Disposed int64 `json:"disposed"` }
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) EarnedSatellite ¶ added in v1.32.1
func (service *Service) EarnedSatellite(ctx context.Context) (earned []SatelliteSummary, err error)
EarnedSatellite retrieves all nodes earned amount for all time per satellite.
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) HeldAmountSummary ¶ added in v1.32.1
func (service *Service) HeldAmountSummary(ctx context.Context, nodeID storj.NodeID) (_ []HeldAmountSummary, err error)
HeldAmountSummary retrieves held amount history summary for a particular node.
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) 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.
func (*Service) PaystubSatellite ¶ added in v1.32.1
func (service *Service) PaystubSatellite(ctx context.Context, nodeID, satelliteID storj.NodeID) (_ Paystub, err error)
PaystubSatellite returns specific satellite summed paystubs.
func (*Service) PaystubSatellitePeriod ¶ added in v1.32.1
func (service *Service) PaystubSatellitePeriod(ctx context.Context, period string, nodeID, satelliteID storj.NodeID) (_ Paystub, err error)
PaystubSatellitePeriod returns specific satellite paystub for specific period.
func (*Service) SummaryPeriod ¶ added in v1.32.1
SummaryPeriod returns all satellites stats for specific period.