data

package
v0.0.0-...-6d19cb1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashLen = 32
	SigLen  = 65
)

Variables

This section is empty.

Functions

func Decode

func Decode(r io.Reader) (channel.Data, error)

Types

type Cert

type Cert struct {
	Signature [SigLen]byte
}

Cert represents an offer response.

func (*Cert) Clone

func (d *Cert) Clone() channel.Data

Clone returns a deep copy of the app data.

func (*Cert) Encode

func (d *Cert) Encode(w io.Writer) error

Encode encodes the data onto an io.Writer.

func (*Cert) Unmarshal

func (d *Cert) Unmarshal(b []byte) error

type DefaultData

type DefaultData struct{}

DefaultData represents the default state.

func (*DefaultData) Clone

func (d *DefaultData) Clone() channel.Data

Clone returns a deep copy of the data.

func (*DefaultData) Encode

func (d *DefaultData) Encode(w io.Writer) error

Encode encodes the data onto an io.Writer.

type Mode

type Mode = uint8

type Offer

type Offer struct {
	Issuer   common.Address
	DataHash [HashLen]byte
	Price    *big.Int
	Buyer    uint16
}

Offer represents an offer.

func (*Offer) Clone

func (d *Offer) Clone() channel.Data

Clone returns a deep copy of the app data.

func (*Offer) Encode

func (d *Offer) Encode(w io.Writer) error

Encode encodes app data onto an io.Writer.

func (Offer) Equal

func (a Offer) Equal(b *Offer) bool

func (*Offer) Unmarshal

func (d *Offer) Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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