json

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockJSON

type BlockJSON struct {
	Index    uint64
	TreeRoot []byte
	Data     json.RawMessage
}

BlockJSON is the JSON message for a block.

type BlockMessageJSON

type BlockMessageJSON struct {
	Block json.RawMessage
	Views map[string]ViewMessageJSON
}

BlockMessageJSON is the JSON message to send a block.

type ChainJSON

type ChainJSON struct {
	Links []json.RawMessage
}

ChainJSON is the JSON message for a chain.

type CommitMessageJSON

type CommitMessageJSON struct {
	ID        []byte
	Signature json.RawMessage
}

CommitMessageJSON is the JSON message to send a commit request.

type DoneMessageJSON

type DoneMessageJSON struct {
	ID        []byte
	Signature json.RawMessage
}

DoneMessageJSON is the JSON message to send a block confirmation.

type GenesisJSON

type GenesisJSON struct {
	Roster   json.RawMessage
	TreeRoot []byte
}

GenesisJSON is the JSON message for a genesis block.

type GenesisMessageJSON

type GenesisMessageJSON struct {
	Genesis json.RawMessage
}

GenesisMessageJSON is the JSON message to send a genesis block.

type LinkJSON

type LinkJSON struct {
	From             []byte
	To               []byte `json:",omitempty"`
	PrepareSignature json.RawMessage
	CommitSignature  json.RawMessage
	ChangeSet        json.RawMessage
	Block            json.RawMessage `json:",omitempty"`
}

LinkJSON is the JSON message for a link.

type MessageJSON

type MessageJSON struct {
	Genesis *GenesisMessageJSON `json:",omitempty"`
	Block   *BlockMessageJSON   `json:",omitempty"`
	Commit  *CommitMessageJSON  `json:",omitempty"`
	Done    *DoneMessageJSON    `json:",omitempty"`
	View    *ViewMessageJSON    `json:",omitempty"`
}

MessageJSON is the JSON message that wraps the different kinds of messages.

type ViewMessageJSON

type ViewMessageJSON struct {
	Leader    uint16
	ID        []byte
	Signature json.RawMessage
}

ViewMessageJSON is the JSON message to send a view change request.

Jump to

Keyboard shortcuts

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