ipldfree

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeBuilder

func NodeBuilder() ipld.NodeBuilder

NodeBuilder returns a new ipld.NodeBuilder implementation that will produce ipldfree.Node instances.

There are no constraints on free nodes, so none of the create methods will ever return errors.

func String added in v0.0.2

func String(value string) ipld.Node

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node is an implementatin of `ipld.Node` that can contain any content.

This implementation is extremely simple; it is general-purpose, but not optimized for any particular purpose.

The "zero" value of this struct has a kind of ReprKind_Invalid. NodeBuilder must be used to produce valid instances of Node.

func (*Node) AsBool

func (n *Node) AsBool() (v bool, _ error)

func (*Node) AsBytes

func (n *Node) AsBytes() (v []byte, _ error)

func (*Node) AsFloat

func (n *Node) AsFloat() (v float64, _ error)

func (*Node) AsInt

func (n *Node) AsInt() (v int, _ error)
func (n *Node) AsLink() (v ipld.Link, _ error)

func (*Node) AsString

func (n *Node) AsString() (v string, _ error)

func (*Node) IsNull

func (n *Node) IsNull() bool

func (Node) IsUndefined

func (Node) IsUndefined() bool

func (*Node) Length

func (n *Node) Length() int

func (*Node) ListIterator

func (n *Node) ListIterator() ipld.ListIterator

func (*Node) Lookup added in v0.0.2

func (n *Node) Lookup(key ipld.Node) (ipld.Node, error)

func (*Node) LookupIndex added in v0.0.2

func (n *Node) LookupIndex(idx int) (ipld.Node, error)

func (*Node) LookupSegment added in v0.0.2

func (n *Node) LookupSegment(seg ipld.PathSegment) (ipld.Node, error)

func (*Node) LookupString added in v0.0.2

func (n *Node) LookupString(pth string) (ipld.Node, error)

func (*Node) MapIterator

func (n *Node) MapIterator() ipld.MapIterator

func (*Node) NodeBuilder

func (n *Node) NodeBuilder() ipld.NodeBuilder

func (*Node) ReprKind

func (n *Node) ReprKind() ipld.ReprKind

Jump to

Keyboard shortcuts

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