dashboard

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0, BSD-2-Clause Imports: 53 Imported by: 1

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Index

Constants

View Source
const (
	// CfgBindAddress defines the config flag of the dashboard binding address.
	CfgBindAddress = "dashboard.bindAddress"
	// CfgDev defines the config flag of the  dashboard dev mode.
	CfgDev = "dashboard.dev"
	// CfgBasicAuthEnabled defines the config flag of the dashboard basic auth enabler.
	CfgBasicAuthEnabled = "dashboard.basic_auth.enabled"
	// CfgBasicAuthUsername defines the config flag of the dashboard basic auth username.
	CfgBasicAuthUsername = "dashboard.basic_auth.username"
	// CfgBasicAuthPassword defines the config flag of the dashboard basic auth password.
	CfgBasicAuthPassword = "dashboard.basic_auth.password"
)
View Source
const (
	// MsgTypeNodeStatus is the type of the NodeStatus message.
	MsgTypeNodeStatus byte = iota
	// MsgTypeMPSMetric is the type of the message per second (MPS) metric message.
	MsgTypeMPSMetric
	// MsgTypeMessage is the type of the message.
	MsgTypeMessage
	// MsgTypeNeighborMetric is the type of the NeighborMetric message.
	MsgTypeNeighborMetric
	// MsgTypeDrng is the type of the dRNG message.
	MsgTypeDrng
	// MsgTypeTipsMetric is the type of the TipsMetric message.
	MsgTypeTipsMetric
	// MsgTypeVertex defines a vertex message.
	MsgTypeVertex
	// MsgTypeTipInfo defines a tip info message.
	MsgTypeTipInfo
)
View Source
const PluginName = "Dashboard"

PluginName is the name of the dashboard plugin.

Variables

View Source
var ErrForbidden = errors.New("forbidden")

ErrForbidden defines the forbidden error.

View Source
var ErrInternalError = errors.New("internal error")

ErrInternalError defines the internal error.

View Source
var ErrInvalidParameter = errors.New("invalid parameter")

ErrInvalidParameter defines the invalid parameter error.

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound defines the not found error.

Functions

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

func ProcessPayload

func ProcessPayload(p payload.Payload) interface{}

ProcessPayload returns different structs regarding to the payload type.

Types

type Balance

type Balance struct {
	Value int64  `json:"value"`
	Color string `json:"color"`
}

Balance contains the amount of specific color token

type BasicPayload

type BasicPayload struct {
	ContentTitle string `json:"content_title"`
	Content      []byte `json:"content"`
}

BasicPayload contains content title and bytes It can be reused with different payload that only contains one field.

type BasicStringPayload

type BasicStringPayload struct {
	ContentTitle string `json:"content_title"`
	Content      string `json:"content"`
}

BasicStringPayload contains content title and string content

type Beacon added in v0.2.2

type Beacon struct {
	MsgID    string `json:"msg_id"`
	SentTime int64  `json:"sent_time"`
	Synced   bool   `json:"synced"`
}

Beacon contains a sync beacons detailed status.

type DrngCollectiveBeaconPayload

type DrngCollectiveBeaconPayload struct {
	Round   uint64 `json:"round"`
	PrevSig []byte `json:"prev_sig"`
	Sig     []byte `json:"sig"`
	Dpk     []byte `json:"dpk"`
}

DrngCollectiveBeaconPayload is the subpayload of DrngPayload.

type DrngPayload

type DrngPayload struct {
	SubPayloadType byte        `json:"subpayload_type"`
	InstanceID     uint32      `json:"instance_id"`
	SubPayload     interface{} `json:"drngpayload"`
}

DrngPayload contains the subtype of drng payload, instance ID and the subpayload

type ExplorerAddress

type ExplorerAddress struct {
	Address   string           `json:"address"`
	OutputIDs []ExplorerOutput `json:"output_ids"`
}

ExplorerAddress defines the struct of the ExplorerAddress.

type ExplorerMessage

type ExplorerMessage struct {
	// ID is the message ID.
	ID string `json:"id"`
	// SolidificationTimestamp is the timestamp of the message.
	SolidificationTimestamp int64 `json:"solidification_timestamp"`
	// The time when this message was issued
	IssuanceTimestamp int64 `json:"issuance_timestamp"`
	// The issuer's sequence number of this message.
	SequenceNumber uint64 `json:"sequence_number"`
	// The public key of the issuer who issued this message.
	IssuerPublicKey string `json:"issuer_public_key"`
	// The signature of the message.
	Signature string `json:"signature"`
	// TrunkMessageId is the Trunk ID of the message.
	TrunkMessageID string `json:"trunk_message_id"`
	// BranchMessageId is the Branch ID of the message.
	BranchMessageID string `json:"branch_message_id"`
	// Solid defines the solid status of the message.
	Solid bool `json:"solid"`
	// PayloadType defines the type of the payload.
	PayloadType uint32 `json:"payload_type"`
	// Payload is the content of the payload.
	Payload interface{} `json:"payload"`
}

ExplorerMessage defines the struct of the ExplorerMessage.

type ExplorerOutput

type ExplorerOutput struct {
	ID                 string               `json:"id"`
	Balances           []utils.Balance      `json:"balances"`
	InclusionState     utils.InclusionState `json:"inclusion_state"`
	SolidificationTime int64                `json:"solidification_time"`
	ConsumerCount      int                  `json:"consumer_count"`
}

ExplorerOutput defines the struct of the ExplorerOutput.

type InputContent

type InputContent struct {
	Address string `json:"address"`
}

InputContent contains the inputs of a transaction

type OutputContent

type OutputContent struct {
	Address  string    `json:"address"`
	Balances []Balance `json:"balance"`
}

OutputContent contains the outputs of a transaction

type ReqMsg

type ReqMsg struct {
	ID string `json:"MsgId"`
}

ReqMsg defines the struct of the faucet request message ID.

type SearchResult

type SearchResult struct {
	// Message is the *ExplorerMessage.
	Message *ExplorerMessage `json:"message"`
	// Address is the *ExplorerAddress.
	Address *ExplorerAddress `json:"address"`
}

SearchResult defines the struct of the SearchResult.

type SyncBeaconPayload added in v0.2.2

type SyncBeaconPayload struct {
	SentTime int64 `json:"sent_time"`
}

SyncBeaconPayload contains sent time of a sync beacon.

type ValuePayload

type ValuePayload struct {
	ID        string          `json:"payload_id"`
	ParentID0 string          `json:"parent_id_0"`
	ParentID1 string          `json:"parent_id_1"`
	TxID      string          `json:"tx_id"`
	Input     []InputContent  `json:"inputs"`
	Output    []OutputContent `json:"outputs"`
	Data      []byte          `json:"data"`
}

ValuePayload contains the transaction information

Directories

Path Synopsis
You can use the "packr2 clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

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