Documentation ¶
Index ¶
- Variables
- func AddDagPBSupportToChooser(existing traversal.LinkTargetNodePrototypeChooser) traversal.LinkTargetNodePrototypeChooser
- func PBDecoder(nb ipld.NodeAssembler, r io.Reader) error
- func PBEncoder(n ipld.Node, w io.Writer) error
- func RawDecoder(nb ipld.NodeAssembler, r io.Reader) error
- func RawEncoder(n ipld.Node, w io.Writer) error
- type Bytes
- func (Bytes) AsBool() (bool, error)
- func (n Bytes) AsBytes() ([]byte, error)
- func (Bytes) AsFloat() (float64, error)
- func (Bytes) AsInt() (int64, error)
- func (Bytes) AsLink() (ipld.Link, error)
- func (Bytes) AsString() (string, error)
- func (n Bytes) Bytes() []byte
- func (Bytes) IsAbsent() bool
- func (Bytes) IsNull() bool
- func (Bytes) Kind() ipld.Kind
- func (Bytes) Length() int64
- func (Bytes) ListIterator() ipld.ListIterator
- func (Bytes) LookupByIndex(idx int64) (ipld.Node, error)
- func (Bytes) LookupByNode(ipld.Node) (ipld.Node, error)
- func (Bytes) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (Bytes) LookupByString(string) (ipld.Node, error)
- func (Bytes) MapIterator() ipld.MapIterator
- func (Bytes) Prototype() ipld.NodePrototype
- func (n Bytes) Representation() ipld.Node
- func (Bytes) Type() schema.Type
- type Int
- func (Int) AsBool() (bool, error)
- func (Int) AsBytes() ([]byte, error)
- func (Int) AsFloat() (float64, error)
- func (n Int) AsInt() (int64, error)
- func (Int) AsLink() (ipld.Link, error)
- func (Int) AsString() (string, error)
- func (n Int) Int() int64
- func (Int) IsAbsent() bool
- func (Int) IsNull() bool
- func (Int) Kind() ipld.Kind
- func (Int) Length() int64
- func (Int) ListIterator() ipld.ListIterator
- func (Int) LookupByIndex(idx int64) (ipld.Node, error)
- func (Int) LookupByNode(ipld.Node) (ipld.Node, error)
- func (Int) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (Int) LookupByString(string) (ipld.Node, error)
- func (Int) MapIterator() ipld.MapIterator
- func (Int) Prototype() ipld.NodePrototype
- func (n Int) Representation() ipld.Node
- func (Int) Type() schema.Type
- type Link
- func (Link) AsBool() (bool, error)
- func (Link) AsBytes() ([]byte, error)
- func (Link) AsFloat() (float64, error)
- func (Link) AsInt() (int64, error)
- func (n Link) AsLink() (ipld.Link, error)
- func (Link) AsString() (string, error)
- func (Link) IsAbsent() bool
- func (Link) IsNull() bool
- func (Link) Kind() ipld.Kind
- func (Link) Length() int64
- func (n Link) Link() ipld.Link
- func (Link) ListIterator() ipld.ListIterator
- func (Link) LookupByIndex(idx int64) (ipld.Node, error)
- func (Link) LookupByNode(ipld.Node) (ipld.Node, error)
- func (Link) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (Link) LookupByString(string) (ipld.Node, error)
- func (Link) MapIterator() ipld.MapIterator
- func (Link) Prototype() ipld.NodePrototype
- func (n Link) Representation() ipld.Node
- func (Link) Type() schema.Type
- type MaybeBytes
- type MaybeInt
- type MaybeLink
- type MaybePBLink
- type MaybePBLinks
- type MaybePBNode
- type MaybeRawNode
- type MaybeString
- type PBLink
- func (PBLink) AsBool() (bool, error)
- func (PBLink) AsBytes() ([]byte, error)
- func (PBLink) AsFloat() (float64, error)
- func (PBLink) AsInt() (int64, error)
- func (PBLink) AsLink() (ipld.Link, error)
- func (PBLink) AsString() (string, error)
- func (PBLink) IsAbsent() bool
- func (PBLink) IsNull() bool
- func (PBLink) Kind() ipld.Kind
- func (PBLink) Length() int64
- func (PBLink) ListIterator() ipld.ListIterator
- func (PBLink) LookupByIndex(idx int64) (ipld.Node, error)
- func (n PBLink) LookupByNode(key ipld.Node) (ipld.Node, error)
- func (n PBLink) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (n PBLink) LookupByString(key string) (ipld.Node, error)
- func (n PBLink) MapIterator() ipld.MapIterator
- func (PBLink) Prototype() ipld.NodePrototype
- func (n PBLink) Representation() ipld.Node
- func (PBLink) Type() schema.Type
- type PBLinks
- func (PBLinks) AsBool() (bool, error)
- func (PBLinks) AsBytes() ([]byte, error)
- func (PBLinks) AsFloat() (float64, error)
- func (PBLinks) AsInt() (int64, error)
- func (PBLinks) AsLink() (ipld.Link, error)
- func (PBLinks) AsString() (string, error)
- func (PBLinks) IsAbsent() bool
- func (PBLinks) IsNull() bool
- func (n PBLinks) Iterator() *PBLinks__Itr
- func (PBLinks) Kind() ipld.Kind
- func (n PBLinks) Length() int64
- func (n PBLinks) ListIterator() ipld.ListIterator
- func (n PBLinks) LookupByIndex(idx int64) (ipld.Node, error)
- func (n PBLinks) LookupByNode(k ipld.Node) (ipld.Node, error)
- func (n PBLinks) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (PBLinks) LookupByString(string) (ipld.Node, error)
- func (PBLinks) MapIterator() ipld.MapIterator
- func (PBLinks) Prototype() ipld.NodePrototype
- func (n PBLinks) Representation() ipld.Node
- func (PBLinks) Type() schema.Type
- type PBLinks__Itr
- type PBNode
- func (PBNode) AsBool() (bool, error)
- func (PBNode) AsBytes() ([]byte, error)
- func (PBNode) AsFloat() (float64, error)
- func (PBNode) AsInt() (int64, error)
- func (PBNode) AsLink() (ipld.Link, error)
- func (PBNode) AsString() (string, error)
- func (nd PBNode) EncodeDagProto(w io.Writer) error
- func (PBNode) IsAbsent() bool
- func (PBNode) IsNull() bool
- func (PBNode) Kind() ipld.Kind
- func (PBNode) Length() int64
- func (PBNode) ListIterator() ipld.ListIterator
- func (PBNode) LookupByIndex(idx int64) (ipld.Node, error)
- func (n PBNode) LookupByNode(key ipld.Node) (ipld.Node, error)
- func (n PBNode) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (n PBNode) LookupByString(key string) (ipld.Node, error)
- func (n PBNode) MapIterator() ipld.MapIterator
- func (PBNode) Prototype() ipld.NodePrototype
- func (n PBNode) Representation() ipld.Node
- func (PBNode) Type() schema.Type
- type RawNode
- func (RawNode) AsBool() (bool, error)
- func (n RawNode) AsBytes() ([]byte, error)
- func (RawNode) AsFloat() (float64, error)
- func (RawNode) AsInt() (int64, error)
- func (RawNode) AsLink() (ipld.Link, error)
- func (RawNode) AsString() (string, error)
- func (n RawNode) Bytes() []byte
- func (nd RawNode) EncodeDagRaw(w io.Writer) error
- func (RawNode) IsAbsent() bool
- func (RawNode) IsNull() bool
- func (RawNode) Kind() ipld.Kind
- func (RawNode) Length() int64
- func (RawNode) ListIterator() ipld.ListIterator
- func (RawNode) LookupByIndex(idx int64) (ipld.Node, error)
- func (RawNode) LookupByNode(ipld.Node) (ipld.Node, error)
- func (RawNode) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (RawNode) LookupByString(string) (ipld.Node, error)
- func (RawNode) MapIterator() ipld.MapIterator
- func (RawNode) Prototype() ipld.NodePrototype
- func (n RawNode) Representation() ipld.Node
- func (RawNode) Type() schema.Type
- type String
- func (String) AsBool() (bool, error)
- func (String) AsBytes() ([]byte, error)
- func (String) AsFloat() (float64, error)
- func (String) AsInt() (int64, error)
- func (String) AsLink() (ipld.Link, error)
- func (n String) AsString() (string, error)
- func (String) IsAbsent() bool
- func (String) IsNull() bool
- func (String) Kind() ipld.Kind
- func (String) Length() int64
- func (String) ListIterator() ipld.ListIterator
- func (String) LookupByIndex(idx int64) (ipld.Node, error)
- func (String) LookupByNode(ipld.Node) (ipld.Node, error)
- func (String) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (String) LookupByString(string) (ipld.Node, error)
- func (String) MapIterator() ipld.MapIterator
- func (String) Prototype() ipld.NodePrototype
- func (n String) Representation() ipld.Node
- func (n String) String() string
- func (String) Type() schema.Type
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoAutomaticDecoding means the NodeBuilder must provide a fast path decoding method on its own ErrNoAutomaticDecoding = errors.New("No automatic decoding for this type, node builder must provide fast path") // ErrNoAutomaticEncoding means the Node must provide a fast path encoding method on its own ErrNoAutomaticEncoding = errors.New("No automatic encoding for this type, node must provide fast path") )
var Type typeSlab
Type is a struct embeding a NodePrototype/Type for every Node implementation in this package. One of its major uses is to start the construction of a value. You can use it like this:
dagpb.Type.YourTypeName.NewBuilder().BeginMap() //...
and:
dagpb.Type.OtherTypeName.NewBuilder().AssignString("x") // ...
Functions ¶
func AddDagPBSupportToChooser ¶
func AddDagPBSupportToChooser(existing traversal.LinkTargetNodePrototypeChooser) traversal.LinkTargetNodePrototypeChooser
AddDagPBSupportToChooser takes an existing NodeBuilderChooser and subs in Protobuf and Raw node builders where neccesary
func PBDecoder ¶
func PBDecoder(nb ipld.NodeAssembler, r io.Reader) error
PBDecoder is a decoder function for Dag Protobuf nodes
func RawDecoder ¶
func RawDecoder(nb ipld.NodeAssembler, r io.Reader) error
RawDecoder is a decoder function for raw coded nodes
Types ¶
type Bytes ¶
type Bytes = *_Bytes
Bytes matches the IPLD Schema type "Bytes". It has bytes kind.
func (Bytes) ListIterator ¶
func (Bytes) ListIterator() ipld.ListIterator
func (Bytes) LookupBySegment ¶
func (Bytes) MapIterator ¶
func (Bytes) MapIterator() ipld.MapIterator
func (Bytes) Prototype ¶
func (Bytes) Prototype() ipld.NodePrototype
func (Bytes) Representation ¶
type Int ¶
type Int = *_Int
Int matches the IPLD Schema type "Int". It has int kind.
func (Int) ListIterator ¶
func (Int) ListIterator() ipld.ListIterator
func (Int) LookupBySegment ¶
func (Int) MapIterator ¶
func (Int) MapIterator() ipld.MapIterator
func (Int) Prototype ¶
func (Int) Prototype() ipld.NodePrototype
func (Int) Representation ¶
type Link ¶
type Link = *_Link
Link matches the IPLD Schema type "Link". It has link kind.
func (Link) ListIterator ¶
func (Link) ListIterator() ipld.ListIterator
func (Link) LookupBySegment ¶
func (Link) MapIterator ¶
func (Link) MapIterator() ipld.MapIterator
func (Link) Prototype ¶
func (Link) Prototype() ipld.NodePrototype
func (Link) Representation ¶
type MaybeBytes ¶
type MaybeBytes = *_Bytes__Maybe
func (MaybeBytes) AsNode ¶
func (m MaybeBytes) AsNode() ipld.Node
func (MaybeBytes) Exists ¶
func (m MaybeBytes) Exists() bool
func (MaybeBytes) IsAbsent ¶
func (m MaybeBytes) IsAbsent() bool
func (MaybeBytes) IsNull ¶
func (m MaybeBytes) IsNull() bool
func (MaybeBytes) Must ¶
func (m MaybeBytes) Must() Bytes
type MaybePBLink ¶
type MaybePBLink = *_PBLink__Maybe
func (MaybePBLink) AsNode ¶
func (m MaybePBLink) AsNode() ipld.Node
func (MaybePBLink) Exists ¶
func (m MaybePBLink) Exists() bool
func (MaybePBLink) IsAbsent ¶
func (m MaybePBLink) IsAbsent() bool
func (MaybePBLink) IsNull ¶
func (m MaybePBLink) IsNull() bool
func (MaybePBLink) Must ¶
func (m MaybePBLink) Must() PBLink
type MaybePBLinks ¶
type MaybePBLinks = *_PBLinks__Maybe
func (MaybePBLinks) AsNode ¶
func (m MaybePBLinks) AsNode() ipld.Node
func (MaybePBLinks) Exists ¶
func (m MaybePBLinks) Exists() bool
func (MaybePBLinks) IsAbsent ¶
func (m MaybePBLinks) IsAbsent() bool
func (MaybePBLinks) IsNull ¶
func (m MaybePBLinks) IsNull() bool
func (MaybePBLinks) Must ¶
func (m MaybePBLinks) Must() PBLinks
type MaybePBNode ¶
type MaybePBNode = *_PBNode__Maybe
func (MaybePBNode) AsNode ¶
func (m MaybePBNode) AsNode() ipld.Node
func (MaybePBNode) Exists ¶
func (m MaybePBNode) Exists() bool
func (MaybePBNode) IsAbsent ¶
func (m MaybePBNode) IsAbsent() bool
func (MaybePBNode) IsNull ¶
func (m MaybePBNode) IsNull() bool
func (MaybePBNode) Must ¶
func (m MaybePBNode) Must() PBNode
type MaybeRawNode ¶
type MaybeRawNode = *_RawNode__Maybe
func (MaybeRawNode) AsNode ¶
func (m MaybeRawNode) AsNode() ipld.Node
func (MaybeRawNode) Exists ¶
func (m MaybeRawNode) Exists() bool
func (MaybeRawNode) IsAbsent ¶
func (m MaybeRawNode) IsAbsent() bool
func (MaybeRawNode) IsNull ¶
func (m MaybeRawNode) IsNull() bool
func (MaybeRawNode) Must ¶
func (m MaybeRawNode) Must() RawNode
type MaybeString ¶
type MaybeString = *_String__Maybe
func (MaybeString) AsNode ¶
func (m MaybeString) AsNode() ipld.Node
func (MaybeString) Exists ¶
func (m MaybeString) Exists() bool
func (MaybeString) IsAbsent ¶
func (m MaybeString) IsAbsent() bool
func (MaybeString) IsNull ¶
func (m MaybeString) IsNull() bool
func (MaybeString) Must ¶
func (m MaybeString) Must() String
type PBLink ¶
type PBLink = *_PBLink
PBLink matches the IPLD Schema type "PBLink". It has Struct type-kind, and may be interrogated like map kind.
func (PBLink) ListIterator ¶
func (PBLink) ListIterator() ipld.ListIterator
func (PBLink) LookupBySegment ¶
func (PBLink) MapIterator ¶
func (n PBLink) MapIterator() ipld.MapIterator
func (PBLink) Prototype ¶
func (PBLink) Prototype() ipld.NodePrototype
func (PBLink) Representation ¶
type PBLinks ¶
type PBLinks = *_PBLinks
PBLinks matches the IPLD Schema type "PBLinks". It has list kind.
func (PBLinks) Iterator ¶ added in v0.1.1
func (n PBLinks) Iterator() *PBLinks__Itr
func (PBLinks) ListIterator ¶
func (n PBLinks) ListIterator() ipld.ListIterator
func (PBLinks) LookupBySegment ¶
func (PBLinks) MapIterator ¶
func (PBLinks) MapIterator() ipld.MapIterator
func (PBLinks) Prototype ¶
func (PBLinks) Prototype() ipld.NodePrototype
func (PBLinks) Representation ¶
type PBLinks__Itr ¶ added in v0.1.1
type PBLinks__Itr struct {
// contains filtered or unexported fields
}
func (*PBLinks__Itr) Done ¶ added in v0.1.1
func (itr *PBLinks__Itr) Done() bool
func (*PBLinks__Itr) Next ¶ added in v0.1.1
func (itr *PBLinks__Itr) Next() (idx int64, v PBLink)
type PBNode ¶
type PBNode = *_PBNode
PBNode matches the IPLD Schema type "PBNode". It has Struct type-kind, and may be interrogated like map kind.
func (PBNode) EncodeDagProto ¶
EncodeDagProto is a fast path encoding to protobuf for PBNode types
func (PBNode) ListIterator ¶
func (PBNode) ListIterator() ipld.ListIterator
func (PBNode) LookupBySegment ¶
func (PBNode) MapIterator ¶
func (n PBNode) MapIterator() ipld.MapIterator
func (PBNode) Prototype ¶
func (PBNode) Prototype() ipld.NodePrototype
func (PBNode) Representation ¶
type RawNode ¶
type RawNode = *_RawNode
RawNode matches the IPLD Schema type "RawNode". It has bytes kind.
func (RawNode) EncodeDagRaw ¶
EncodeDagRaw is a fast path encoding to protobuf for RawNode types
func (RawNode) ListIterator ¶
func (RawNode) ListIterator() ipld.ListIterator
func (RawNode) LookupBySegment ¶
func (RawNode) MapIterator ¶
func (RawNode) MapIterator() ipld.MapIterator
func (RawNode) Prototype ¶
func (RawNode) Prototype() ipld.NodePrototype
func (RawNode) Representation ¶
type String ¶
type String = *_String
String matches the IPLD Schema type "String". It has string kind.
func (String) ListIterator ¶
func (String) ListIterator() ipld.ListIterator
func (String) LookupBySegment ¶
func (String) MapIterator ¶
func (String) MapIterator() ipld.MapIterator
func (String) Prototype ¶
func (String) Prototype() ipld.NodePrototype