controllers

package
v1.25.3-rc-multipart Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNodes is an internal error type for nodes web api controller.
	ErrNodes = errs.Class("nodes web api controller error")
)
View Source
var (
	// ErrPayouts is an internal error type for payouts web api controller.
	ErrPayouts = errs.Class("payouts web api controller error")
)

Functions

func NewNotFound

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

NewNotFound creates new instance of NotFound handler.

Types

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 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) GetAllNodesTotalEarned added in v1.24.2

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

GetAllNodesTotalEarned handles retrieval total earned amount .

Jump to

Keyboard shortcuts

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