controllers

package
v1.74.0-rc Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBandwidth is an internal error type for bandwidth web api controller.
	ErrBandwidth = errs.Class("bandwidth web api controller")
)
View Source
var (
	// ErrNodes is an internal error type for nodes web api controller.
	ErrNodes = errs.Class("nodes web api controller")
)
View Source
var (
	// ErrOperators is an internal error type for operators web api controller.
	ErrOperators = errs.Class("nodes web api controller")
)
View Source
var (
	// ErrPayouts is an internal error type for payouts web api controller.
	ErrPayouts = errs.Class("payouts web api controller")
)
View Source
var (
	// ErrReputation is an error type for reputation web api controller.
	ErrReputation = errs.Class("reputation web api controller")
)
View Source
var (
	// ErrStorage is an internal error type for storage web api controller.
	ErrStorage = errs.Class("storage web api controller")
)

Functions

func NewNotFound

func NewNotFound(log *zap.Logger) http.Handler

NewNotFound creates new instance of NotFound handler.

Types

type Bandwidth added in v1.33.1

type Bandwidth struct {
	// contains filtered or unexported fields
}

Bandwidth is a web api controller.

func NewBandwidth added in v1.33.1

func NewBandwidth(log *zap.Logger, service *bandwidth.Service) *Bandwidth

NewBandwidth is a constructor for Bandwidth.

func (*Bandwidth) Monthly added in v1.33.1

func (controller *Bandwidth) Monthly(w http.ResponseWriter, r *http.Request)

Monthly handles all satellites all nodes bandwidth monthly.

func (*Bandwidth) MonthlyNode added in v1.33.1

func (controller *Bandwidth) MonthlyNode(w http.ResponseWriter, r *http.Request)

MonthlyNode handles all satellites single node bandwidth monthly.

func (*Bandwidth) MonthlySatellite added in v1.33.1

func (controller *Bandwidth) MonthlySatellite(w http.ResponseWriter, r *http.Request)

MonthlySatellite handles specific satellite all nodes bandwidth monthly.

func (*Bandwidth) MonthlySatelliteNode added in v1.33.1

func (controller *Bandwidth) MonthlySatelliteNode(w http.ResponseWriter, r *http.Request)

MonthlySatelliteNode handles specific satellite single node bandwidth monthly.

type Nodes

type Nodes struct {
	// contains filtered or unexported fields
}

Nodes is a web api controller.

func NewNodes

func NewNodes(log *zap.Logger, service *nodes.Service) *Nodes

NewNodes is a constructor for Nodes.

func (*Nodes) Add

func (controller *Nodes) Add(w http.ResponseWriter, r *http.Request)

Add handles node addition.

func (*Nodes) Delete

func (controller *Nodes) Delete(w http.ResponseWriter, r *http.Request)

Delete handles node removal.

func (*Nodes) Get

func (controller *Nodes) Get(w http.ResponseWriter, r *http.Request)

Get handles retrieving node by id.

func (*Nodes) ListInfos

func (controller *Nodes) ListInfos(w http.ResponseWriter, r *http.Request)

ListInfos handles node basic info list retrieval.

func (*Nodes) ListInfosSatellite

func (controller *Nodes) ListInfosSatellite(w http.ResponseWriter, r *http.Request)

ListInfosSatellite handles node satellite specific info list retrieval.

func (*Nodes) TrustedSatellites added in v1.21.1

func (controller *Nodes) TrustedSatellites(w http.ResponseWriter, r *http.Request)

TrustedSatellites handles retrieval of unique trusted satellites node urls list.

func (*Nodes) UpdateName

func (controller *Nodes) UpdateName(w http.ResponseWriter, r *http.Request)

UpdateName is an endpoint to update node name.

type NotFound

type NotFound struct {
	// contains filtered or unexported fields
}

NotFound handles API response for not found routes.

func (*NotFound) ServeHTTP

func (handler *NotFound) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves 404 response with json error when resource is not found.

type Operators added in v1.32.1

type Operators struct {
	// contains filtered or unexported fields
}

Operators is a web api controller.

func NewOperators added in v1.32.1

func NewOperators(log *zap.Logger, service *operators.Service) *Operators

NewOperators is a constructor for Operators.

func (*Operators) ListPaginated added in v1.32.1

func (controller *Operators) ListPaginated(w http.ResponseWriter, r *http.Request)

ListPaginated handles retrieval of operators.

type Payouts added in v1.24.2

type Payouts struct {
	// contains filtered or unexported fields
}

Payouts is a web api controller.

func NewPayouts added in v1.24.2

func NewPayouts(log *zap.Logger, service *payouts.Service) *Payouts

NewPayouts is a constructor for Payouts.

func (*Payouts) Earned added in v1.32.1

func (controller *Payouts) Earned(w http.ResponseWriter, r *http.Request)

Earned handles retrieval total earned amount .

func (*Payouts) Expectations added in v1.31.1

func (controller *Payouts) Expectations(w http.ResponseWriter, r *http.Request)

Expectations handles nodes estimated and undistributed earnings.

func (*Payouts) HeldAmountSummary added in v1.32.1

func (controller *Payouts) HeldAmountSummary(w http.ResponseWriter, r *http.Request)

HeldAmountSummary handles retrieving held amount history for a node.

func (*Payouts) NodeExpectations added in v1.31.1

func (controller *Payouts) NodeExpectations(w http.ResponseWriter, r *http.Request)

NodeExpectations handles node's estimated and undistributed.

func (*Payouts) Paystub added in v1.31.1

func (controller *Payouts) Paystub(w http.ResponseWriter, r *http.Request)

Paystub returns all summed paystubs.

func (*Payouts) PaystubPeriod added in v1.31.1

func (controller *Payouts) PaystubPeriod(w http.ResponseWriter, r *http.Request)

PaystubPeriod returns all satellites summed paystubs for period.

func (*Payouts) PaystubSatellite added in v1.32.1

func (controller *Payouts) PaystubSatellite(w http.ResponseWriter, r *http.Request)

PaystubSatellite returns all summed paystubs from specific satellite.

func (*Payouts) PaystubSatellitePeriod added in v1.32.1

func (controller *Payouts) PaystubSatellitePeriod(w http.ResponseWriter, r *http.Request)

PaystubSatellitePeriod returns satellite summed paystubs for period.

func (*Payouts) Summary added in v1.30.1

func (controller *Payouts) Summary(w http.ResponseWriter, r *http.Request)

Summary handles retrieval from nodes.

func (*Payouts) SummaryPeriod added in v1.32.1

func (controller *Payouts) SummaryPeriod(w http.ResponseWriter, r *http.Request)

SummaryPeriod handles retrieval from nodes for specific period.

func (*Payouts) SummarySatellite added in v1.32.1

func (controller *Payouts) SummarySatellite(w http.ResponseWriter, r *http.Request)

SummarySatellite handles retrieval from nodes from specific satellite.

func (*Payouts) SummarySatellitePeriod added in v1.32.1

func (controller *Payouts) SummarySatellitePeriod(w http.ResponseWriter, r *http.Request)

SummarySatellitePeriod handles retrieval from nodes from specific satellite for specific period.

type Reputation added in v1.34.1

type Reputation struct {
	// contains filtered or unexported fields
}

Reputation is a reputation web api controller.

func NewReputation added in v1.34.1

func NewReputation(log *zap.Logger, service *reputation.Service) *Reputation

NewReputation is a constructor of reputation controller.

func (*Reputation) Stats added in v1.34.1

func (controller *Reputation) Stats(w http.ResponseWriter, r *http.Request)

Stats handles retrieval of a node reputation for particular satellite.

type Storage added in v1.33.1

type Storage struct {
	// contains filtered or unexported fields
}

Storage is a storage web api controller.

func NewStorage added in v1.33.1

func NewStorage(log *zap.Logger, service *storage.Service) *Storage

NewStorage is a constructor of Storage controller.

func (*Storage) DiskSpace added in v1.33.1

func (controller *Storage) DiskSpace(w http.ResponseWriter, r *http.Request)

DiskSpace returns all info about concrete storagenode disk space usage.

func (*Storage) TotalDiskSpace added in v1.33.1

func (controller *Storage) TotalDiskSpace(w http.ResponseWriter, r *http.Request)

TotalDiskSpace returns all info about all storagenodes disk space usage.

func (*Storage) TotalUsage added in v1.33.1

func (controller *Storage) TotalUsage(w http.ResponseWriter, r *http.Request)

TotalUsage handles retrieval of aggregated storage usage for a period interval.

func (*Storage) TotalUsageSatellite added in v1.33.1

func (controller *Storage) TotalUsageSatellite(w http.ResponseWriter, r *http.Request)

TotalUsageSatellite handles retrieval of aggregated storage usage for a satellite and period interval.

func (*Storage) Usage added in v1.33.1

func (controller *Storage) Usage(w http.ResponseWriter, r *http.Request)

Usage handles retrieval of a node storage usage for a period interval.

func (*Storage) UsageSatellite added in v1.33.1

func (controller *Storage) UsageSatellite(w http.ResponseWriter, r *http.Request)

UsageSatellite handles retrieval of a node storage usage for a satellite and period interval.

Jump to

Keyboard shortcuts

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