voucher

package
v0.0.0-...-5f04e11 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator struct {
}

func (*Validator) ValidatePull

func (vl *Validator) ValidatePull(
	isRestart bool,
	chid datatransfer.ChannelID,
	receiver peer.ID,
	voucher datatransfer.Voucher,
	baseCid cid.Cid,
	selector ipld.Node) (datatransfer.VoucherResult, error)

func (*Validator) ValidatePush

func (vl *Validator) ValidatePush(
	isRestart bool,
	chid datatransfer.ChannelID,
	sender peer.ID,
	voucher datatransfer.Voucher,
	baseCid cid.Cid,
	selector ipld.Node) (datatransfer.VoucherResult, error)

type Voucher

type Voucher struct {
	C *cid.Cid
}

A Voucher is used to communicate a new DAG head

func (*Voucher) MarshalCBOR

func (t *Voucher) MarshalCBOR(w io.Writer) error

func (*Voucher) Type

Type provides an identifier for the voucher to go-data-transfer

func (*Voucher) UnmarshalCBOR

func (t *Voucher) UnmarshalCBOR(r io.Reader) error

type VoucherResult

type VoucherResult struct {
	Code uint64
}

A VoucherResult responds to a voucher

func (*VoucherResult) MarshalCBOR

func (t *VoucherResult) MarshalCBOR(w io.Writer) error

func (*VoucherResult) Type

Type provides an identifier for the voucher result to go-data-transfer

func (*VoucherResult) UnmarshalCBOR

func (t *VoucherResult) UnmarshalCBOR(r io.Reader) error

Jump to

Keyboard shortcuts

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