testbridge

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInvalidSelectorSpec

func NewInvalidSelectorSpec(cidsVisited []cid.Cid) ipld.Node

NewInvalidSelectorSpec returns a spec that will fail when you attempt to encode it.

func NewMockBlockNode

func NewMockBlockNode(data []byte) ipld.Node

NewMockBlockNode returns a new node for a byte array

func NewMockIPLDBridge

func NewMockIPLDBridge() ipldbridge.IPLDBridge

NewMockIPLDBridge returns an ipld bridge with mocked behavior

func NewMockLink() ipld.Link

NewMockLink produces an object that conforms to the ipld Link interface.

func NewMockLoader

func NewMockLoader(blks []blocks.Block) ipldbridge.Loader

NewMockLoader returns a new loader function that loads only the given blocks

func NewMockSelectorSpec

func NewMockSelectorSpec(cidsVisited []cid.Cid) ipld.Node

NewMockSelectorSpec returns a new mock selector that will visit the given cids.

func NewMockStore

func NewMockStore(blocksWritten map[ipld.Link][]byte) (ipldbridge.Loader, ipldbridge.Storer)

NewMockStore provides a loader and storer for the given in memory link -> byte data map

func NewUnencodableSelectorSpec

func NewUnencodableSelectorSpec(cidsVisited []cid.Cid) ipld.Node

NewUnencodableSelectorSpec returns a spec that will fail when you attempt to encode it.

func NewUnparsableSelectorSpec

func NewUnparsableSelectorSpec(cidsVisited []cid.Cid) ipld.Node

NewUnparsableSelectorSpec returns a spec that will fail when you attempt to validate it or decompose to a node + selector.

Types

This section is empty.

Jump to

Keyboard shortcuts

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