basicnode

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Prototype prototype

Prototype embeds a NodePrototype for every kind of Node implementation in this package. You can use it like this:

basicnode.Prototype.Map.NewBuilder().BeginMap() //...

and:

basicnode.Prototype.String.NewBuilder().AssignString("x") // ...

Most of the prototypes are for one particular Kind of node (e.g. string, int, etc); you can use the "Any" style if you want a builder that can accept any kind of data.

Functions

func NewBool

func NewBool(value bool) ipld.Node

func NewBytes

func NewBytes(value []byte) ipld.Node

func NewFloat

func NewFloat(value float64) ipld.Node

func NewInt

func NewInt(value int) ipld.Node
func NewLink(value ipld.Link) ipld.Node

func NewString

func NewString(value string) ipld.Node

Types

type Prototype__Any

type Prototype__Any struct{}

func (Prototype__Any) NewBuilder

func (Prototype__Any) NewBuilder() ipld.NodeBuilder

type Prototype__Bool

type Prototype__Bool struct{}

func (Prototype__Bool) NewBuilder

func (Prototype__Bool) NewBuilder() ipld.NodeBuilder

type Prototype__Bytes

type Prototype__Bytes struct{}

func (Prototype__Bytes) NewBuilder

func (Prototype__Bytes) NewBuilder() ipld.NodeBuilder

type Prototype__Float

type Prototype__Float struct{}

func (Prototype__Float) NewBuilder

func (Prototype__Float) NewBuilder() ipld.NodeBuilder

type Prototype__Int

type Prototype__Int struct{}

func (Prototype__Int) NewBuilder

func (Prototype__Int) NewBuilder() ipld.NodeBuilder
type Prototype__Link struct{}

func (Prototype__Link) NewBuilder

func (Prototype__Link) NewBuilder() ipld.NodeBuilder

type Prototype__List

type Prototype__List struct{}

func (Prototype__List) NewBuilder

func (Prototype__List) NewBuilder() ipld.NodeBuilder

type Prototype__Map

type Prototype__Map struct{}

func (Prototype__Map) NewBuilder

func (Prototype__Map) NewBuilder() ipld.NodeBuilder

type Prototype__String

type Prototype__String struct{}

func (Prototype__String) NewBuilder

func (Prototype__String) NewBuilder() ipld.NodeBuilder

Jump to

Keyboard shortcuts

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