api

package
v0.0.0-...-14f6295 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LimitOffset

type LimitOffset struct {
	Limit  uint64
	Offset uint64
	Page   uint64
}

type Pagination

type Pagination struct {
	CurrentPage uint64 `json:"current_page"`
	TotalPages  uint64 `json:"total_pages"`
	TotalRows   uint64 `json:"total_rows"`
}

type RESTApiV1

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

func NewRESTApiV1

func NewRESTApiV1(mt *metrics.Metrics, logger *zap.Logger) *RESTApiV1

func (*RESTApiV1) GetAllAPIs

func (a *RESTApiV1) GetAllAPIs() []string

func (*RESTApiV1) GetAllNodes

func (a *RESTApiV1) GetAllNodes(resp http.ResponseWriter, req *http.Request)

GetAllNodes implements GET /metrics/nodes

func (*RESTApiV1) GetBridgeNodes

func (a *RESTApiV1) GetBridgeNodes(resp http.ResponseWriter, req *http.Request)

GetBridgeNodes implements GET /metrics/nodes/bridge

func (*RESTApiV1) GetFullNodes

func (a *RESTApiV1) GetFullNodes(resp http.ResponseWriter, req *http.Request)

GetFullNodes implements GET /metrics/nodes/full

func (*RESTApiV1) GetLightNodes

func (a *RESTApiV1) GetLightNodes(resp http.ResponseWriter, req *http.Request)

GetLightNodes implements GET /metrics/nodes/light

func (*RESTApiV1) GetNodeById

func (a *RESTApiV1) GetNodeById(resp http.ResponseWriter, req *http.Request)

GetNodeById implements GET /metrics/nodes/{id}

func (*RESTApiV1) GetNodeByIdAtNetworkHeight

func (a *RESTApiV1) GetNodeByIdAtNetworkHeight(resp http.ResponseWriter, req *http.Request)

GetNodeByIdAtNetworkHeight implements GET /metrics/nodes/{id}/height/{height} GetNodeByIdAtNetworkHeight implements GET /metrics/nodes/{id}/height/{height}/{height_end} Search into a range of heights

func (*RESTApiV1) GetNodeUptimeById

func (a *RESTApiV1) GetNodeUptimeById(resp http.ResponseWriter, req *http.Request)

GetNodeUptimeById implements GET /uptime/nodes/{id}

func (*RESTApiV1) GetNodeVersionsById

func (a *RESTApiV1) GetNodeVersionsById(resp http.ResponseWriter, req *http.Request)

GetNodeVersionsById implements GET /versions/nodes/{id}

func (*RESTApiV1) IndexPage

func (a *RESTApiV1) IndexPage(resp http.ResponseWriter, req *http.Request)

IndexPage implements GET /

func (*RESTApiV1) Serve

func (a *RESTApiV1) Serve(addr, originAllowed string) error

func (*RESTApiV1) UI

func (a *RESTApiV1) UI(resp http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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