json

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address []byte

type EndShuffle

type EndShuffle struct {
}

type Message

type Message struct {
	StartShuffle *StartShuffle `json:",omitempty"`
	EndShuffle   *EndShuffle   `json:",omitempty"`
}

type MsgFormat

type MsgFormat struct {
	// contains filtered or unexported fields
}

MsgFormat is the engine to encode and decode SHUFFLE messages in JSON format.

- implements serde.FormatEngine

func NewMsgFormat

func NewMsgFormat() MsgFormat

func (MsgFormat) Decode

func (f MsgFormat) Decode(ctx serde.Context, data []byte) (serde.Message, error)

Decode implements serde.FormatEngine. It populates the message from the JSON data if appropriate, otherwise it returns an error.

func (MsgFormat) Encode

func (f MsgFormat) Encode(ctx serde.Context, msg serde.Message) ([]byte, error)

Encode implements serde.FormatEngine. It returns the serialized data for the message in JSON format.

type StartShuffle

type StartShuffle struct {
	FormId    string
	Addresses []Address
}

Jump to

Keyboard shortcuts

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