message

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0, BSD-2-Clause Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const PluginName = "WebAPI message Endpoint"

PluginName is the name of the web API message endpoint plugin.

Variables

This section is empty.

Functions

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

Types

type Message

type Message struct {
	Metadata        `json:"metadata,omitempty"`
	ID              string `json:"ID,omitempty"`
	TrunkID         string `json:"trunkId,omitempty"`
	BranchID        string `json:"branchId,omitempty"`
	IssuerPublicKey string `json:"issuerPublicKey,omitempty"`
	IssuingTime     int64  `json:"issuingTime,omitempty"`
	SequenceNumber  uint64 `json:"sequenceNumber,omitempty"`
	Payload         []byte `json:"payload,omitempty"`
	Signature       string `json:"signature,omitempty"`
}

Message contains information about a given message.

type Metadata

type Metadata struct {
	Solid              bool  `json:"solid,omitempty"`
	SolidificationTime int64 `json:"solidificationTime,omitempty"`
}

Metadata contains metadata information of a message.

type MsgRequest

type MsgRequest struct {
	Payload []byte `json:"payload"`
}

MsgRequest contains the message to send.

type MsgResponse

type MsgResponse struct {
	ID    string `json:"id,omitempty"`
	Error string `json:"error,omitempty"`
}

MsgResponse contains the ID of the message sent.

type Request

type Request struct {
	IDs []string `json:"ids"`
}

Request holds the message ids to query.

type Response

type Response struct {
	Messages []Message `json:"messages,omitempty"`
	Error    string    `json:"error,omitempty"`
}

Response is the HTTP response containing the queried messages.

Jump to

Keyboard shortcuts

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