messages

package
v0.4.12 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const EventMessageName = "event/v0"
View Source
const PriceMessageName = "price/v0"

Variables

View Source
var ErrPriceMalformedMessage = errors.New("malformed price message")

Functions

This section is empty.

Types

type Event

type Event struct {
	// Type of the event.
	Type string
	// Unique ID of the event.
	ID []byte
	// Event index used to search for events.
	Index []byte
	// The date of the event.
	EventDate time.Time
	// The date when the event message was created.
	MessageDate time.Time
	// List of event data.
	Data map[string][]byte
	// List of event signatures.
	Signatures map[string]EventSignature
}

func (*Event) MarshallBinary

func (e *Event) MarshallBinary() ([]byte, error)

MarshallBinary implements the transport.Message interface.

func (*Event) UnmarshallBinary

func (e *Event) UnmarshallBinary(data []byte) error

UnmarshallBinary implements the transport.Message interface.

type EventSignature added in v0.4.2

type EventSignature struct {
	Signer    []byte
	Signature []byte
}

type Price

type Price struct {
	Price *oracle.Price   `json:"price"`
	Trace json.RawMessage `json:"trace"`
}

func (*Price) Marshall

func (p *Price) Marshall() ([]byte, error)

func (*Price) MarshallBinary

func (p *Price) MarshallBinary() ([]byte, error)

MarshallBinary implements the transport.Message interface.

func (*Price) Unmarshall

func (p *Price) Unmarshall(b []byte) error

func (*Price) UnmarshallBinary

func (p *Price) UnmarshallBinary(data []byte) error

UnmarshallBinary implements the transport.Message interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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