Documentation ¶
Index ¶
- Constants
- Variables
- func ApprovalHandler(c echo.Context) error
- func MissingHandler(c echo.Context) error
- func OrphanageHandler(c echo.Context) error
- func PastconeHandler(c echo.Context) error
- type ApprovalResponse
- type ByArrival
- type ByIssuance
- type BySolid
- type MissingResponse
- type MsgApproval
- type MsgInfo
- type MsgInfoOrphanage
- type OrphanageResponse
- type PastconeRequest
- type PastconeResponse
Constants ¶
const (
// CfgExportPath the directory where exported files sit.
CfgExportPath = "webapi.exportPath"
)
Variables ¶
var TableDescription = []string{
"nodeID",
"MsgID",
"MsgIssuerID",
"MsgIssuanceTime",
"MsgArrivalTime",
"MsgSolidTime",
"ByIssuanceMsgID",
"ByIssuanceMsgIssuerID",
"ByIssuanceMsgIssuanceTime",
"ByIssuanceMsgArrivalTime",
"ByIssuanceMsgSolidTime",
"ByArrivalMsgID",
"ByArrivalMsgIssuerID",
"ByArrivalMsgIssuanceTime",
"ByArrivalMsgArrivalTime",
"ByArrivalMsgSolidTime",
"BySolidMsgID",
"BySolidMsgIssuerID",
"BySolidMsgIssuanceTime",
"BySolidMsgArrivalTime",
"BySolidMsgSolidTime",
}
TableDescription holds the description of the First Approval analysis table.
var TableDescriptionOrphanage = []string{
"MsgID",
"MsgIssuerID",
"MsgIssuanceTime",
"MsgArrivalTime",
"MsgSolidTime",
"MsgApprovedBy",
}
TableDescriptionOrphanage holds the description of the First Approval analysis table.
Functions ¶
func ApprovalHandler ¶ added in v0.3.6
ApprovalHandler runs the approval analysis.
func MissingHandler ¶
MissingHandler process missing requests.
func OrphanageHandler ¶ added in v0.4.1
OrphanageHandler runs the orphanage analysis.
func PastconeHandler ¶
PastconeHandler process a pastcone request.
Types ¶
type ApprovalResponse ¶ added in v0.3.6
type ApprovalResponse struct {
Err error `json:"error,omitempty"`
}
ApprovalResponse is the HTTP response.
type ByArrival ¶ added in v0.3.6
type ByArrival []MsgInfo
ByArrival defines a slice of MsgInfo sortable by arrival time.
type ByIssuance ¶ added in v0.3.6
type ByIssuance []MsgInfo
ByIssuance defines a slice of MsgInfo sortable by timestamp issuance.
func (ByIssuance) Len ¶ added in v0.3.6
func (a ByIssuance) Len() int
func (ByIssuance) Less ¶ added in v0.3.6
func (a ByIssuance) Less(i, j int) bool
func (ByIssuance) Swap ¶ added in v0.3.6
func (a ByIssuance) Swap(i, j int)
type BySolid ¶ added in v0.3.6
type BySolid []MsgInfo
BySolid defines a slice of MsgInfo sortable by solid time.
type MissingResponse ¶
type MissingResponse struct { IDs []string `json:"ids,omitempty"` Count int `json:"count,omitempty"` }
MissingResponse is the HTTP response containing all the missing messages and their count.
type MsgApproval ¶ added in v0.3.6
type MsgApproval struct { NodeID string Msg MsgInfo FirstApproverByIssuance MsgInfo FirstApproverByArrival MsgInfo FirstApproverBySolid MsgInfo }
MsgApproval holds the information of the first approval by issucane, arrival and solid time.
type MsgInfo ¶ added in v0.3.6
type MsgInfo struct { MsgID string MsgIssuerID string MsgIssuanceTimestamp time.Time MsgArrivalTime time.Time MsgSolidTime time.Time }
MsgInfo holds the information of a message.
type MsgInfoOrphanage ¶ added in v0.4.1
type MsgInfoOrphanage struct { MsgID tangle.MessageID MsgIssuerID ed25519.PublicKey MsgIssuanceTimestamp time.Time MsgArrivalTime time.Time MsgSolidTime time.Time MsgApprovedBy bool }
MsgInfoOrphanage holds the information of a message.
type OrphanageResponse ¶ added in v0.4.1
type OrphanageResponse struct {
Err string `json:"error,omitempty"`
}
OrphanageResponse is the HTTP response.
type PastconeRequest ¶
type PastconeRequest struct {
ID string `json:"id"`
}
PastconeRequest holds the message id to query.
type PastconeResponse ¶
type PastconeResponse struct { Exist bool `json:"exist,omitempty"` PastConeSize int `json:"pastConeSize,omitempty"` Error string `json:"error,omitempty"` }
PastconeResponse is the HTTP response containing the number of messages in the past cone and if all messages of the past cone exist on the node.