codec

package
v0.0.0-...-34de315 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Batch_TypeID = 0x864e51a95b5bacee

Batch_TypeID is the unique identifier for the type Batch.

View Source
const Discover_TypeID = 0x8aec40e836a6b678

Discover_TypeID is the unique identifier for the type Discover.

View Source
const Fee_TypeID = 0xcda91da91de91079

Fee_TypeID is the unique identifier for the type Fee.

View Source
const Inventory_TypeID = 0x894854b19b0bdf88

Inventory_TypeID is the unique identifier for the type Inventory.

View Source
const Mempool_TypeID = 0xf0380ead552fac15

Mempool_TypeID is the unique identifier for the type Mempool.

View Source
const Peers_TypeID = 0xbd8afa1dc55b521a

Peers_TypeID is the unique identifier for the type Peers.

View Source
const Ping_TypeID = 0xa4c448def3da1fe5

Ping_TypeID is the unique identifier for the type Ping.

View Source
const Pong_TypeID = 0xe5b532ff4fa02dff

Pong_TypeID is the unique identifier for the type Pong.

View Source
const Request_TypeID = 0xe8d311873fc93b93

Request_TypeID is the unique identifier for the type Request.

View Source
const Transaction_TypeID = 0xec9fd906d129035f

Transaction_TypeID is the unique identifier for the type Transaction.

View Source
const Transfer_TypeID = 0xfebd493a48891da9

Transfer_TypeID is the unique identifier for the type Transfer.

View Source
const Z_TypeID = 0xb46d352733d41eba

Z_TypeID is the unique identifier for the type Z.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct{ capnp.Struct }

func NewBatch

func NewBatch(s *capnp.Segment) (Batch, error)

func NewRootBatch

func NewRootBatch(s *capnp.Segment) (Batch, error)

func ReadRootBatch

func ReadRootBatch(msg *capnp.Message) (Batch, error)

func (Batch) HasTransactions

func (s Batch) HasTransactions() bool

func (Batch) NewTransactions

func (s Batch) NewTransactions(n int32) (Transaction_List, error)

NewTransactions sets the transactions field to a newly allocated Transaction_List, preferring placement in s's segment.

func (Batch) SetTransactions

func (s Batch) SetTransactions(v Transaction_List) error

func (Batch) String

func (s Batch) String() string

func (Batch) Transactions

func (s Batch) Transactions() (Transaction_List, error)

type Batch_List

type Batch_List struct{ capnp.List }

Batch_List is a list of Batch.

func NewBatch_List

func NewBatch_List(s *capnp.Segment, sz int32) (Batch_List, error)

NewBatch creates a new list of Batch.

func (Batch_List) At

func (s Batch_List) At(i int) Batch

func (Batch_List) Set

func (s Batch_List) Set(i int, v Batch) error

func (Batch_List) String

func (s Batch_List) String() string

type Batch_Promise

type Batch_Promise struct{ *capnp.Pipeline }

Batch_Promise is a wrapper for a Batch promised by a client call.

func (Batch_Promise) Struct

func (p Batch_Promise) Struct() (Batch, error)

type Discover

type Discover struct{ capnp.Struct }

func NewDiscover

func NewDiscover(s *capnp.Segment) (Discover, error)

func NewRootDiscover

func NewRootDiscover(s *capnp.Segment) (Discover, error)

func ReadRootDiscover

func ReadRootDiscover(msg *capnp.Message) (Discover, error)

func (Discover) String

func (s Discover) String() string

type Discover_List

type Discover_List struct{ capnp.List }

Discover_List is a list of Discover.

func NewDiscover_List

func NewDiscover_List(s *capnp.Segment, sz int32) (Discover_List, error)

NewDiscover creates a new list of Discover.

func (Discover_List) At

func (s Discover_List) At(i int) Discover

func (Discover_List) Set

func (s Discover_List) Set(i int, v Discover) error

func (Discover_List) String

func (s Discover_List) String() string

type Discover_Promise

type Discover_Promise struct{ *capnp.Pipeline }

Discover_Promise is a wrapper for a Discover promised by a client call.

func (Discover_Promise) Struct

func (p Discover_Promise) Struct() (Discover, error)

type Fee

type Fee struct{ capnp.Struct }

func NewFee

func NewFee(s *capnp.Segment) (Fee, error)

func NewRootFee

func NewRootFee(s *capnp.Segment) (Fee, error)

func ReadRootFee

func ReadRootFee(msg *capnp.Message) (Fee, error)

func (Fee) Amount

func (s Fee) Amount() uint64

func (Fee) From

func (s Fee) From() ([]byte, error)

func (Fee) HasFrom

func (s Fee) HasFrom() bool

func (Fee) SetAmount

func (s Fee) SetAmount(v uint64)

func (Fee) SetFrom

func (s Fee) SetFrom(v []byte) error

func (Fee) String

func (s Fee) String() string

type Fee_List

type Fee_List struct{ capnp.List }

Fee_List is a list of Fee.

func NewFee_List

func NewFee_List(s *capnp.Segment, sz int32) (Fee_List, error)

NewFee creates a new list of Fee.

func (Fee_List) At

func (s Fee_List) At(i int) Fee

func (Fee_List) Set

func (s Fee_List) Set(i int, v Fee) error

func (Fee_List) String

func (s Fee_List) String() string

type Fee_Promise

type Fee_Promise struct{ *capnp.Pipeline }

Fee_Promise is a wrapper for a Fee promised by a client call.

func (Fee_Promise) Struct

func (p Fee_Promise) Struct() (Fee, error)

type Inventory

type Inventory struct{ capnp.Struct }

func NewInventory

func NewInventory(s *capnp.Segment) (Inventory, error)

func NewRootInventory

func NewRootInventory(s *capnp.Segment) (Inventory, error)

func ReadRootInventory

func ReadRootInventory(msg *capnp.Message) (Inventory, error)

func (Inventory) HasHashes

func (s Inventory) HasHashes() bool

func (Inventory) Hashes

func (s Inventory) Hashes() (capnp.DataList, error)

func (Inventory) NewHashes

func (s Inventory) NewHashes(n int32) (capnp.DataList, error)

NewHashes sets the hashes field to a newly allocated capnp.DataList, preferring placement in s's segment.

func (Inventory) SetHashes

func (s Inventory) SetHashes(v capnp.DataList) error

func (Inventory) String

func (s Inventory) String() string

type Inventory_List

type Inventory_List struct{ capnp.List }

Inventory_List is a list of Inventory.

func NewInventory_List

func NewInventory_List(s *capnp.Segment, sz int32) (Inventory_List, error)

NewInventory creates a new list of Inventory.

func (Inventory_List) At

func (s Inventory_List) At(i int) Inventory

func (Inventory_List) Set

func (s Inventory_List) Set(i int, v Inventory) error

func (Inventory_List) String

func (s Inventory_List) String() string

type Inventory_Promise

type Inventory_Promise struct{ *capnp.Pipeline }

Inventory_Promise is a wrapper for a Inventory promised by a client call.

func (Inventory_Promise) Struct

func (p Inventory_Promise) Struct() (Inventory, error)

type Mempool

type Mempool struct{ capnp.Struct }

func NewMempool

func NewMempool(s *capnp.Segment) (Mempool, error)

func NewRootMempool

func NewRootMempool(s *capnp.Segment) (Mempool, error)

func ReadRootMempool

func ReadRootMempool(msg *capnp.Message) (Mempool, error)

func (Mempool) Bloom

func (s Mempool) Bloom() ([]byte, error)

func (Mempool) HasBloom

func (s Mempool) HasBloom() bool

func (Mempool) SetBloom

func (s Mempool) SetBloom(v []byte) error

func (Mempool) String

func (s Mempool) String() string

type Mempool_List

type Mempool_List struct{ capnp.List }

Mempool_List is a list of Mempool.

func NewMempool_List

func NewMempool_List(s *capnp.Segment, sz int32) (Mempool_List, error)

NewMempool creates a new list of Mempool.

func (Mempool_List) At

func (s Mempool_List) At(i int) Mempool

func (Mempool_List) Set

func (s Mempool_List) Set(i int, v Mempool) error

func (Mempool_List) String

func (s Mempool_List) String() string

type Mempool_Promise

type Mempool_Promise struct{ *capnp.Pipeline }

Mempool_Promise is a wrapper for a Mempool promised by a client call.

func (Mempool_Promise) Struct

func (p Mempool_Promise) Struct() (Mempool, error)

type Peers

type Peers struct{ capnp.Struct }

func NewPeers

func NewPeers(s *capnp.Segment) (Peers, error)

func NewRootPeers

func NewRootPeers(s *capnp.Segment) (Peers, error)

func ReadRootPeers

func ReadRootPeers(msg *capnp.Message) (Peers, error)

func (Peers) Addresses

func (s Peers) Addresses() (capnp.TextList, error)

func (Peers) HasAddresses

func (s Peers) HasAddresses() bool

func (Peers) NewAddresses

func (s Peers) NewAddresses(n int32) (capnp.TextList, error)

NewAddresses sets the addresses field to a newly allocated capnp.TextList, preferring placement in s's segment.

func (Peers) SetAddresses

func (s Peers) SetAddresses(v capnp.TextList) error

func (Peers) String

func (s Peers) String() string

type Peers_List

type Peers_List struct{ capnp.List }

Peers_List is a list of Peers.

func NewPeers_List

func NewPeers_List(s *capnp.Segment, sz int32) (Peers_List, error)

NewPeers creates a new list of Peers.

func (Peers_List) At

func (s Peers_List) At(i int) Peers

func (Peers_List) Set

func (s Peers_List) Set(i int, v Peers) error

func (Peers_List) String

func (s Peers_List) String() string

type Peers_Promise

type Peers_Promise struct{ *capnp.Pipeline }

Peers_Promise is a wrapper for a Peers promised by a client call.

func (Peers_Promise) Struct

func (p Peers_Promise) Struct() (Peers, error)

type Ping

type Ping struct{ capnp.Struct }

func NewPing

func NewPing(s *capnp.Segment) (Ping, error)

func NewRootPing

func NewRootPing(s *capnp.Segment) (Ping, error)

func ReadRootPing

func ReadRootPing(msg *capnp.Message) (Ping, error)

func (Ping) Nonce

func (s Ping) Nonce() uint32

func (Ping) SetNonce

func (s Ping) SetNonce(v uint32)

func (Ping) String

func (s Ping) String() string

type Ping_List

type Ping_List struct{ capnp.List }

Ping_List is a list of Ping.

func NewPing_List

func NewPing_List(s *capnp.Segment, sz int32) (Ping_List, error)

NewPing creates a new list of Ping.

func (Ping_List) At

func (s Ping_List) At(i int) Ping

func (Ping_List) Set

func (s Ping_List) Set(i int, v Ping) error

func (Ping_List) String

func (s Ping_List) String() string

type Ping_Promise

type Ping_Promise struct{ *capnp.Pipeline }

Ping_Promise is a wrapper for a Ping promised by a client call.

func (Ping_Promise) Struct

func (p Ping_Promise) Struct() (Ping, error)

type Pong

type Pong struct{ capnp.Struct }

func NewPong

func NewPong(s *capnp.Segment) (Pong, error)

func NewRootPong

func NewRootPong(s *capnp.Segment) (Pong, error)

func ReadRootPong

func ReadRootPong(msg *capnp.Message) (Pong, error)

func (Pong) Nonce

func (s Pong) Nonce() uint32

func (Pong) SetNonce

func (s Pong) SetNonce(v uint32)

func (Pong) String

func (s Pong) String() string

type Pong_List

type Pong_List struct{ capnp.List }

Pong_List is a list of Pong.

func NewPong_List

func NewPong_List(s *capnp.Segment, sz int32) (Pong_List, error)

NewPong creates a new list of Pong.

func (Pong_List) At

func (s Pong_List) At(i int) Pong

func (Pong_List) Set

func (s Pong_List) Set(i int, v Pong) error

func (Pong_List) String

func (s Pong_List) String() string

type Pong_Promise

type Pong_Promise struct{ *capnp.Pipeline }

Pong_Promise is a wrapper for a Pong promised by a client call.

func (Pong_Promise) Struct

func (p Pong_Promise) Struct() (Pong, error)

type Proto

type Proto struct{}

Proto represents the capnproto serialization module.

func NewProto

func NewProto() Proto

NewProto will return a new proto codec.

func (Proto) Decode

func (p Proto) Decode(r io.Reader) (interface{}, error)

Decode will decode the binary data of the given reader into the original entity.

func (Proto) Encode

func (p Proto) Encode(w io.Writer, entity interface{}) error

Encode will serialize the provided entity by writing the binary format into the provided writer. It will fail if the entity type is unknown.

type Request

type Request struct{ capnp.Struct }

func NewRequest

func NewRequest(s *capnp.Segment) (Request, error)

func NewRootRequest

func NewRootRequest(s *capnp.Segment) (Request, error)

func ReadRootRequest

func ReadRootRequest(msg *capnp.Message) (Request, error)

func (Request) HasHashes

func (s Request) HasHashes() bool

func (Request) Hashes

func (s Request) Hashes() (capnp.DataList, error)

func (Request) NewHashes

func (s Request) NewHashes(n int32) (capnp.DataList, error)

NewHashes sets the hashes field to a newly allocated capnp.DataList, preferring placement in s's segment.

func (Request) SetHashes

func (s Request) SetHashes(v capnp.DataList) error

func (Request) String

func (s Request) String() string

type Request_List

type Request_List struct{ capnp.List }

Request_List is a list of Request.

func NewRequest_List

func NewRequest_List(s *capnp.Segment, sz int32) (Request_List, error)

NewRequest creates a new list of Request.

func (Request_List) At

func (s Request_List) At(i int) Request

func (Request_List) Set

func (s Request_List) Set(i int, v Request) error

func (Request_List) String

func (s Request_List) String() string

type Request_Promise

type Request_Promise struct{ *capnp.Pipeline }

Request_Promise is a wrapper for a Request promised by a client call.

func (Request_Promise) Struct

func (p Request_Promise) Struct() (Request, error)

type Transaction

type Transaction struct{ capnp.Struct }

func NewRootTransaction

func NewRootTransaction(s *capnp.Segment) (Transaction, error)

func NewTransaction

func NewTransaction(s *capnp.Segment) (Transaction, error)

func ReadRootTransaction

func ReadRootTransaction(msg *capnp.Message) (Transaction, error)

func (Transaction) Data

func (s Transaction) Data() ([]byte, error)

func (Transaction) Fees

func (s Transaction) Fees() (Fee_List, error)

func (Transaction) HasData

func (s Transaction) HasData() bool

func (Transaction) HasFees

func (s Transaction) HasFees() bool

func (Transaction) HasSignatures

func (s Transaction) HasSignatures() bool

func (Transaction) HasTransfers

func (s Transaction) HasTransfers() bool

func (Transaction) NewFees

func (s Transaction) NewFees(n int32) (Fee_List, error)

NewFees sets the fees field to a newly allocated Fee_List, preferring placement in s's segment.

func (Transaction) NewSignatures

func (s Transaction) NewSignatures(n int32) (capnp.DataList, error)

NewSignatures sets the signatures field to a newly allocated capnp.DataList, preferring placement in s's segment.

func (Transaction) NewTransfers

func (s Transaction) NewTransfers(n int32) (Transfer_List, error)

NewTransfers sets the transfers field to a newly allocated Transfer_List, preferring placement in s's segment.

func (Transaction) Nonce

func (s Transaction) Nonce() uint64

func (Transaction) SetData

func (s Transaction) SetData(v []byte) error

func (Transaction) SetFees

func (s Transaction) SetFees(v Fee_List) error

func (Transaction) SetNonce

func (s Transaction) SetNonce(v uint64)

func (Transaction) SetSignatures

func (s Transaction) SetSignatures(v capnp.DataList) error

func (Transaction) SetTransfers

func (s Transaction) SetTransfers(v Transfer_List) error

func (Transaction) Signatures

func (s Transaction) Signatures() (capnp.DataList, error)

func (Transaction) String

func (s Transaction) String() string

func (Transaction) Transfers

func (s Transaction) Transfers() (Transfer_List, error)

type Transaction_List

type Transaction_List struct{ capnp.List }

Transaction_List is a list of Transaction.

func NewTransaction_List

func NewTransaction_List(s *capnp.Segment, sz int32) (Transaction_List, error)

NewTransaction creates a new list of Transaction.

func (Transaction_List) At

func (Transaction_List) Set

func (s Transaction_List) Set(i int, v Transaction) error

func (Transaction_List) String

func (s Transaction_List) String() string

type Transaction_Promise

type Transaction_Promise struct{ *capnp.Pipeline }

Transaction_Promise is a wrapper for a Transaction promised by a client call.

func (Transaction_Promise) Struct

func (p Transaction_Promise) Struct() (Transaction, error)

type Transfer

type Transfer struct{ capnp.Struct }

func NewRootTransfer

func NewRootTransfer(s *capnp.Segment) (Transfer, error)

func NewTransfer

func NewTransfer(s *capnp.Segment) (Transfer, error)

func ReadRootTransfer

func ReadRootTransfer(msg *capnp.Message) (Transfer, error)

func (Transfer) Amount

func (s Transfer) Amount() uint64

func (Transfer) From

func (s Transfer) From() ([]byte, error)

func (Transfer) HasFrom

func (s Transfer) HasFrom() bool

func (Transfer) HasTo

func (s Transfer) HasTo() bool

func (Transfer) SetAmount

func (s Transfer) SetAmount(v uint64)

func (Transfer) SetFrom

func (s Transfer) SetFrom(v []byte) error

func (Transfer) SetTo

func (s Transfer) SetTo(v []byte) error

func (Transfer) String

func (s Transfer) String() string

func (Transfer) To

func (s Transfer) To() ([]byte, error)

type Transfer_List

type Transfer_List struct{ capnp.List }

Transfer_List is a list of Transfer.

func NewTransfer_List

func NewTransfer_List(s *capnp.Segment, sz int32) (Transfer_List, error)

NewTransfer creates a new list of Transfer.

func (Transfer_List) At

func (s Transfer_List) At(i int) Transfer

func (Transfer_List) Set

func (s Transfer_List) Set(i int, v Transfer) error

func (Transfer_List) String

func (s Transfer_List) String() string

type Transfer_Promise

type Transfer_Promise struct{ *capnp.Pipeline }

Transfer_Promise is a wrapper for a Transfer promised by a client call.

func (Transfer_Promise) Struct

func (p Transfer_Promise) Struct() (Transfer, error)

type Z

type Z struct{ capnp.Struct }

func NewRootZ

func NewRootZ(s *capnp.Segment) (Z, error)

func NewZ

func NewZ(s *capnp.Segment) (Z, error)

func ReadRootZ

func ReadRootZ(msg *capnp.Message) (Z, error)

func (Z) Batch

func (s Z) Batch() (Batch, error)

func (Z) Discover

func (s Z) Discover() (Discover, error)

func (Z) HasBatch

func (s Z) HasBatch() bool

func (Z) HasDiscover

func (s Z) HasDiscover() bool

func (Z) HasInventory

func (s Z) HasInventory() bool

func (Z) HasMempool

func (s Z) HasMempool() bool

func (Z) HasPeers

func (s Z) HasPeers() bool

func (Z) HasPing

func (s Z) HasPing() bool

func (Z) HasPong

func (s Z) HasPong() bool

func (Z) HasRequest

func (s Z) HasRequest() bool

func (Z) HasTransaction

func (s Z) HasTransaction() bool

func (Z) Inventory

func (s Z) Inventory() (Inventory, error)

func (Z) Mempool

func (s Z) Mempool() (Mempool, error)

func (Z) NewBatch

func (s Z) NewBatch() (Batch, error)

NewBatch sets the batch field to a newly allocated Batch struct, preferring placement in s's segment.

func (Z) NewDiscover

func (s Z) NewDiscover() (Discover, error)

NewDiscover sets the discover field to a newly allocated Discover struct, preferring placement in s's segment.

func (Z) NewInventory

func (s Z) NewInventory() (Inventory, error)

NewInventory sets the inventory field to a newly allocated Inventory struct, preferring placement in s's segment.

func (Z) NewMempool

func (s Z) NewMempool() (Mempool, error)

NewMempool sets the mempool field to a newly allocated Mempool struct, preferring placement in s's segment.

func (Z) NewPeers

func (s Z) NewPeers() (Peers, error)

NewPeers sets the peers field to a newly allocated Peers struct, preferring placement in s's segment.

func (Z) NewPing

func (s Z) NewPing() (Ping, error)

NewPing sets the ping field to a newly allocated Ping struct, preferring placement in s's segment.

func (Z) NewPong

func (s Z) NewPong() (Pong, error)

NewPong sets the pong field to a newly allocated Pong struct, preferring placement in s's segment.

func (Z) NewRequest

func (s Z) NewRequest() (Request, error)

NewRequest sets the request field to a newly allocated Request struct, preferring placement in s's segment.

func (Z) NewTransaction

func (s Z) NewTransaction() (Transaction, error)

NewTransaction sets the transaction field to a newly allocated Transaction struct, preferring placement in s's segment.

func (Z) Peers

func (s Z) Peers() (Peers, error)

func (Z) Ping

func (s Z) Ping() (Ping, error)

func (Z) Pong

func (s Z) Pong() (Pong, error)

func (Z) Request

func (s Z) Request() (Request, error)

func (Z) SetBatch

func (s Z) SetBatch(v Batch) error

func (Z) SetDiscover

func (s Z) SetDiscover(v Discover) error

func (Z) SetInventory

func (s Z) SetInventory(v Inventory) error

func (Z) SetMempool

func (s Z) SetMempool(v Mempool) error

func (Z) SetPeers

func (s Z) SetPeers(v Peers) error

func (Z) SetPing

func (s Z) SetPing(v Ping) error

func (Z) SetPong

func (s Z) SetPong(v Pong) error

func (Z) SetRequest

func (s Z) SetRequest(v Request) error

func (Z) SetTransaction

func (s Z) SetTransaction(v Transaction) error

func (Z) String

func (s Z) String() string

func (Z) Transaction

func (s Z) Transaction() (Transaction, error)

func (Z) Which

func (s Z) Which() Z_Which

type Z_List

type Z_List struct{ capnp.List }

Z_List is a list of Z.

func NewZ_List

func NewZ_List(s *capnp.Segment, sz int32) (Z_List, error)

NewZ creates a new list of Z.

func (Z_List) At

func (s Z_List) At(i int) Z

func (Z_List) Set

func (s Z_List) Set(i int, v Z) error

func (Z_List) String

func (s Z_List) String() string

type Z_Promise

type Z_Promise struct{ *capnp.Pipeline }

Z_Promise is a wrapper for a Z promised by a client call.

func (Z_Promise) Batch

func (p Z_Promise) Batch() Batch_Promise

func (Z_Promise) Discover

func (p Z_Promise) Discover() Discover_Promise

func (Z_Promise) Inventory

func (p Z_Promise) Inventory() Inventory_Promise

func (Z_Promise) Mempool

func (p Z_Promise) Mempool() Mempool_Promise

func (Z_Promise) Peers

func (p Z_Promise) Peers() Peers_Promise

func (Z_Promise) Ping

func (p Z_Promise) Ping() Ping_Promise

func (Z_Promise) Pong

func (p Z_Promise) Pong() Pong_Promise

func (Z_Promise) Request

func (p Z_Promise) Request() Request_Promise

func (Z_Promise) Struct

func (p Z_Promise) Struct() (Z, error)

func (Z_Promise) Transaction

func (p Z_Promise) Transaction() Transaction_Promise

type Z_Which

type Z_Which uint16
const (
	Z_Which_ping        Z_Which = 0
	Z_Which_pong        Z_Which = 1
	Z_Which_discover    Z_Which = 2
	Z_Which_peers       Z_Which = 3
	Z_Which_transaction Z_Which = 4
	Z_Which_mempool     Z_Which = 5
	Z_Which_inventory   Z_Which = 6
	Z_Which_request     Z_Which = 7
	Z_Which_batch       Z_Which = 8
)

func (Z_Which) String

func (w Z_Which) String() string

Jump to

Keyboard shortcuts

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