Documentation
¶
Index ¶
Constants ¶
const PluginName = "WebAPI message Endpoint"
PluginName is the name of the web API message endpoint plugin.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FindByIDRequest ¶ added in v0.3.0
type FindByIDRequest struct {
IDs []string `json:"ids"`
}
FindByIDRequest holds the message ids to query.
type FindByIDResponse ¶ added in v0.3.0
type FindByIDResponse struct {
Messages []Message `json:"messages,omitempty"`
Error string `json:"error,omitempty"`
}
FindByIDResponse is the HTTP response containing the queried messages.
type Markers ¶ added in v0.4.1
type Markers struct {
Markers map[markers.SequenceID]markers.Index `json:"markers"`
HighestIndex markers.Index `json:"highestIndex"`
LowestIndex markers.Index `json:"lowestIndex"`
}
Markers represents a collection of Markers that can contain exactly one Index per SequenceID.
type Message ¶
type Message struct {
Metadata `json:"metadata"`
ID string `json:"ID"`
StrongParents []string `json:"strongParents"`
WeakParents []string `json:"weakParents"`
IssuerPublicKey string `json:"issuerPublicKey"`
IssuingTime int64 `json:"issuingTime"`
SequenceNumber uint64 `json:"sequenceNumber"`
PayloadType string `json:"payloadType"`
Payload []byte `json:"payload"`
Signature string `json:"signature"`
}
Message contains information about a given message.
type Metadata ¶
type Metadata struct {
ReceivedTime int64 `json:"receivedTime"`
Solid bool `json:"solid"`
SolidificationTime int64 `json:"solidificationTime"`
StructureDetails StructureDetails `json:"structureDetails"`
BranchID string `json:"branchID"`
TimestampOpinion TimestampOpinion `json:"timestampOpinion"`
Scheduled bool `json:"scheduled"`
Booked bool `json:"booked"`
Eligible bool `json:"eligible"`
Invalid bool `json:"invalid"`
}
Metadata contains metadata information of a message.
type SendPayloadRequest ¶ added in v0.3.0
type SendPayloadRequest struct {
Payload []byte `json:"payload"`
}
SendPayloadRequest contains the message to send.
type SendPayloadResponse ¶ added in v0.3.0
type SendPayloadResponse struct {
ID string `json:"id,omitempty"`
Error string `json:"error,omitempty"`
}
SendPayloadResponse contains the ID of the message sent.
type StructureDetails ¶ added in v0.4.1
type StructureDetails struct {
Rank uint64 `json:"rank"`
IsPastMarker bool `json:"isPastMarker"`
PastMarkers Markers `json:"pastMarkers"`
FutureMarkers Markers `json:"futureMarkers"`
}
StructureDetails represents a container for the complete Marker related information of a node in a DAG that are used to interact with the public API of this package.
type TimestampOpinion ¶ added in v0.4.1
type TimestampOpinion struct {
Value uint8 `json:"value"`
LoK tangle.LevelOfKnowledge `json:"lok"`
}
TimestampOpinion contains the value of a timestamp opinion as well as its level of knowledge.