consoleapi

package
v1.71.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotificationsAPI = errs.Class("consoleapi notifications")

ErrNotificationsAPI - console notifications api error type.

View Source
var ErrPayoutAPI = errs.Class("consoleapi payouts")

ErrPayoutAPI - console payouts api error type.

View Source
var ErrStorageNodeAPI = errs.Class("consoleapi storagenode")

ErrStorageNodeAPI - console storagenode api error type.

Functions

This section is empty.

Types

type Notifications

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

Notifications is an api controller that exposes all notifications related api.

func NewNotifications

func NewNotifications(log *zap.Logger, service *notifications.Service) *Notifications

NewNotifications is a constructor for notifications controller.

func (*Notifications) ListNotifications

func (notification *Notifications) ListNotifications(w http.ResponseWriter, r *http.Request)

ListNotifications returns listed page of notifications from database.

func (*Notifications) ReadAllNotifications

func (notification *Notifications) ReadAllNotifications(w http.ResponseWriter, r *http.Request)

ReadAllNotifications updates all notifications in database as read.

func (*Notifications) ReadNotification

func (notification *Notifications) ReadNotification(w http.ResponseWriter, r *http.Request)

ReadNotification updates specific notification in database as read.

type Page

type Page struct {
	Notifications []notifications.Notification `json:"notifications"`

	Offset      uint64 `json:"offset"`
	Limit       uint   `json:"limit"`
	CurrentPage uint   `json:"currentPage"`
	PageCount   uint   `json:"pageCount"`
}

Page contains notifications and related information.

type Payout added in v1.13.1

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

Payout is an api controller that exposes all payouts related api.

func NewPayout added in v1.13.1

func NewPayout(log *zap.Logger, service *payouts.Service) *Payout

NewPayout is a constructor for payouts controller.

func (*Payout) HeldAmountPeriods added in v1.13.1

func (payout *Payout) HeldAmountPeriods(w http.ResponseWriter, r *http.Request)

HeldAmountPeriods retrieves all periods in which we have some payouts data. Have optional parameter - satelliteID. If satelliteID specified - will retrieve periods only for concrete satellite.

func (*Payout) HeldHistory added in v1.13.1

func (payout *Payout) HeldHistory(w http.ResponseWriter, r *http.Request)

HeldHistory returns held amount for each % period for all satellites.

func (*Payout) PayStubMonthly added in v1.13.1

func (payout *Payout) PayStubMonthly(w http.ResponseWriter, r *http.Request)

PayStubMonthly returns payouts, storage holding and prices data for specific month from all satellites or specified satellite by query parameter id.

func (*Payout) PayStubPeriod added in v1.13.1

func (payout *Payout) PayStubPeriod(w http.ResponseWriter, r *http.Request)

PayStubPeriod retrieves paystubs for selected range of months from storagenode database for all satellites or specified satellite by query parameter id.

func (*Payout) PayoutHistory added in v1.13.1

func (payout *Payout) PayoutHistory(w http.ResponseWriter, r *http.Request)

PayoutHistory retrieves paystubs for specific period from all satellites and transaction receipts if exists.

type StorageNode

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

StorageNode is an api controller that exposes all dashboard related api.

func NewStorageNode

func NewStorageNode(log *zap.Logger, service *console.Service) *StorageNode

NewStorageNode is a constructor for sno controller.

func (*StorageNode) EstimatedPayout added in v1.6.1

func (dashboard *StorageNode) EstimatedPayout(w http.ResponseWriter, r *http.Request)

EstimatedPayout returns estimated payouts from specific satellite or all satellites if current traffic level remains same.

func (*StorageNode) Satellite

func (dashboard *StorageNode) Satellite(w http.ResponseWriter, r *http.Request)

Satellite handles satellite API requests.

func (*StorageNode) Satellites

func (dashboard *StorageNode) Satellites(w http.ResponseWriter, r *http.Request)

Satellites handles satellites API request.

func (*StorageNode) StorageNode

func (dashboard *StorageNode) StorageNode(w http.ResponseWriter, r *http.Request)

StorageNode handles StorageNode API requests.

Jump to

Keyboard shortcuts

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