payouts

package
v1.30.0-rc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is an error class for payouts service error.
	Error = errs.Class("payouts")
)

Functions

This section is empty.

Types

type NodeSummary added in v1.30.1

type NodeSummary struct {
	NodeID storj.NodeID `json:"nodeId"`
	Held   int64        `json:"held"`
	Paid   int64        `json:"paid"`
}

NodeSummary contains node's payout information.

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

func NewService(log *zap.Logger, dialer rpc.Dialer, nodes nodes.DB) *Service

NewService creates new instance of Service.

func (*Service) AllNodesEstimations added in v1.30.1

func (service *Service) AllNodesEstimations(ctx context.Context) (_ int64, err error)

AllNodesEstimations returns all satellites all time estimated earnings.

func (*Service) AllNodesSatelliteEstimations added in v1.30.1

func (service *Service) AllNodesSatelliteEstimations(ctx context.Context, satelliteID storj.NodeID) (_ int64, err error)

AllNodesSatelliteEstimations returns specific satellite all time estimated earnings.

func (*Service) GetAllNodesAllTimeEarned

func (service *Service) GetAllNodesAllTimeEarned(ctx context.Context) (earned int64, err error)

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) 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) NodesSummary added in v1.30.1

func (service *Service) NodesSummary(ctx context.Context) (_ Summary, err error)

NodesSummary returns all satellites all time stats.

type Summary added in v1.30.1

type Summary struct {
	TotalEarned int64         `json:"totalEarned"`
	TotalHeld   int64         `json:"totalHeld"`
	TotalPaid   int64         `json:"totalPaid"`
	NodeSummary []NodeSummary `json:"nodeSummary"`
}

Summary contains payouts page data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL