Documentation ¶
Index ¶
- Constants
- func GetPendingMana(c echo.Context) error
- func Plugin() *node.Plugin
- type EventLogsJSON
- type GetAllManaResponse
- type GetEventLogsRequest
- type GetEventLogsResponse
- type GetManaRequest
- type GetManaResponse
- type GetNHighestResponse
- type GetOnlineResponse
- type GetPercentileRequest
- type GetPercentileResponse
- type OnlineNodeStr
- type PastConsensusManaVectorRequest
- type PastConsensusManaVectorResponse
- type PastConsensusVectorMetadataResponse
- type PendingRequest
- type PendingResponse
Constants ¶
const PluginName = "WebAPI Mana Endpoint"
PluginName is the name of the web API mana endpoint plugin.
Variables ¶
This section is empty.
Functions ¶
func GetPendingMana ¶ added in v0.5.3
GetPendingMana handles the request.
Types ¶
type EventLogsJSON ¶
type EventLogsJSON struct { Pledge []*mana.PledgedEventJSON `json:"pledge"` Revoke []*mana.RevokedEventJSON `json:"revoke"` }
EventLogsJSON is a events log in JSON.
type GetAllManaResponse ¶
type GetAllManaResponse struct { Access []mana.NodeStr `json:"access"` AccessTimestamp int64 `json:"accessTimestamp"` Consensus []mana.NodeStr `json:"consensus"` ConsensusTimestamp int64 `json:"consensusTimestamp"` Error string `json:"error,omitempty"` }
GetAllManaResponse is the request to a getAllManaHandler request.
type GetEventLogsRequest ¶
type GetEventLogsRequest struct { NodeIDs []string `json:"nodeIDs"` StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` }
GetEventLogsRequest is the request.
type GetEventLogsResponse ¶
type GetEventLogsResponse struct { Logs map[string]*EventLogsJSON `json:"logs"` Error string `json:"error,omitempty"` StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` }
GetEventLogsResponse is the response.
type GetManaRequest ¶
type GetManaRequest struct {
NodeID string `json:"nodeID"`
}
GetManaRequest is the request for get mana.
type GetManaResponse ¶
type GetManaResponse struct { Error string `json:"error,omitempty"` ShortNodeID string `json:"shortNodeID"` NodeID string `json:"nodeID"` Access float64 `json:"access"` AccessTimestamp int64 `json:"accessTimestamp"` Consensus float64 `json:"consensus"` ConsensusTimestamp int64 `json:"consensusTimestamp"` }
GetManaResponse defines the response for get mana.
type GetNHighestResponse ¶
type GetNHighestResponse struct { Error string `json:"error,omitempty"` Nodes []mana.NodeStr `json:"nodes,omitempty"` Timestamp int64 `json:"timestamp"` }
GetNHighestResponse holds info about nodes and their mana values.
type GetOnlineResponse ¶
type GetOnlineResponse struct { Online []OnlineNodeStr `json:"online"` Error string `json:"error,omitempty"` Timestamp int64 `json:"timestamp"` }
GetOnlineResponse is the response to an online mana request.
type GetPercentileRequest ¶
type GetPercentileRequest struct {
NodeID string `json:"nodeID"`
}
GetPercentileRequest is the request object of mana/percentile.
type GetPercentileResponse ¶
type GetPercentileResponse struct { Error string `json:"error,omitempty"` ShortNodeID string `json:"shortNodeID"` NodeID string `json:"nodeID"` Access float64 `json:"access"` AccessTimestamp int64 `json:"accessTimestamp"` Consensus float64 `json:"consensus"` ConsensusTimestamp int64 `json:"consensusTimestamp"` }
GetPercentileResponse holds info about the mana percentile(s) of a node.
type OnlineNodeStr ¶
type OnlineNodeStr struct { OnlineRank int `json:"rank"` ShortID string `json:"shortNodeID"` ID string `json:"nodeID"` Mana float64 `json:"mana"` }
OnlineNodeStr holds information about online rank, nodeID and mana,
type PastConsensusManaVectorRequest ¶
type PastConsensusManaVectorRequest struct {
Timestamp int64 `json:"timestamp"`
}
PastConsensusManaVectorRequest is the request.
type PastConsensusManaVectorResponse ¶
type PastConsensusManaVectorResponse struct { Consensus []mana.NodeStr `json:"consensus"` Error string `json:"error,omitempty"` TimeStamp int64 `json:"timestamp"` }
PastConsensusManaVectorResponse is the response.
type PastConsensusVectorMetadataResponse ¶
type PastConsensusVectorMetadataResponse struct { Metadata *mana.ConsensusBasePastManaVectorMetadata `json:"metadata,omitempty"` Error string `json:"error,omitempty"` }
PastConsensusVectorMetadataResponse is the response.
type PendingRequest ¶
type PendingRequest struct {
OutputID string `json:"outputID"`
}
PendingRequest is the pending mana request.