Documentation ¶
Index ¶
- func AddUnixFSReificationToLinkSystem(lsys *ipld.LinkSystem)
- func Reify(lnkCtx ipld.LinkContext, maybePBNodeRoot ipld.Node, lsys *ipld.LinkSystem) (ipld.Node, error)
- func UnixFSPathSelector(path string) datamodel.Node
- type PathedPBNode
- func (n PathedPBNode) AsBool() (bool, error)
- func (n PathedPBNode) AsBytes() ([]byte, error)
- func (n PathedPBNode) AsFloat() (float64, error)
- func (n PathedPBNode) AsInt() (int64, error)
- func (n PathedPBNode) AsLink() (ipld.Link, error)
- func (n PathedPBNode) AsString() (string, error)
- func (n PathedPBNode) FieldData() dagpb.MaybeBytes
- func (n PathedPBNode) FieldLinks() dagpb.PBLinks
- func (n PathedPBNode) IsAbsent() bool
- func (n PathedPBNode) IsNull() bool
- func (n PathedPBNode) Iterator() *iter.UnixFSDir__Itr
- func (n PathedPBNode) Kind() ipld.Kind
- func (n PathedPBNode) Length() int64
- func (n PathedPBNode) ListIterator() ipld.ListIterator
- func (n PathedPBNode) Lookup(key dagpb.String) dagpb.Link
- func (n PathedPBNode) LookupByIndex(idx int64) (ipld.Node, error)
- func (n PathedPBNode) LookupByNode(key ipld.Node) (ipld.Node, error)
- func (n PathedPBNode) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
- func (n PathedPBNode) LookupByString(key string) (ipld.Node, error)
- func (n PathedPBNode) MapIterator() ipld.MapIterator
- func (n PathedPBNode) Prototype() ipld.NodePrototype
- func (n PathedPBNode) Representation() ipld.Node
- func (n PathedPBNode) Substrate() ipld.Node
- func (PathedPBNode) Type() schema.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUnixFSReificationToLinkSystem ¶
func AddUnixFSReificationToLinkSystem(lsys *ipld.LinkSystem)
func Reify ¶
func Reify(lnkCtx ipld.LinkContext, maybePBNodeRoot ipld.Node, lsys *ipld.LinkSystem) (ipld.Node, error)
Reify looks at an ipld Node and tries to interpret it as a UnixFSNode if successful, it returns the UnixFSNode
func UnixFSPathSelector ¶
UnixFSPathSelector creates a selector for a file/path inside of a UnixFS directory if reification is setup on a link system
Types ¶
type PathedPBNode ¶
type PathedPBNode = *_PathedPBNode
func (PathedPBNode) AsBool ¶
func (n PathedPBNode) AsBool() (bool, error)
func (PathedPBNode) AsBytes ¶
func (n PathedPBNode) AsBytes() ([]byte, error)
func (PathedPBNode) AsFloat ¶
func (n PathedPBNode) AsFloat() (float64, error)
func (PathedPBNode) AsInt ¶
func (n PathedPBNode) AsInt() (int64, error)
func (PathedPBNode) AsLink ¶
func (n PathedPBNode) AsLink() (ipld.Link, error)
func (PathedPBNode) AsString ¶
func (n PathedPBNode) AsString() (string, error)
func (PathedPBNode) FieldData ¶
func (n PathedPBNode) FieldData() dagpb.MaybeBytes
func (PathedPBNode) FieldLinks ¶
func (n PathedPBNode) FieldLinks() dagpb.PBLinks
func (PathedPBNode) IsAbsent ¶
func (n PathedPBNode) IsAbsent() bool
func (PathedPBNode) IsNull ¶
func (n PathedPBNode) IsNull() bool
func (PathedPBNode) Iterator ¶
func (n PathedPBNode) Iterator() *iter.UnixFSDir__Itr
func (PathedPBNode) Kind ¶
func (n PathedPBNode) Kind() ipld.Kind
func (PathedPBNode) Length ¶
func (n PathedPBNode) Length() int64
Length returns the length of a list, or the number of entries in a map, or -1 if the node is not of list nor map kind.
func (PathedPBNode) ListIterator ¶
func (n PathedPBNode) ListIterator() ipld.ListIterator
ListIterator returns an iterator which yields key-value pairs traversing the node. If the node kind is anything other than a list, nil will be returned.
The iterator will yield every entry in the list; that is, it can be expected that itr.Next will be called node.Length times before itr.Done becomes true.
func (PathedPBNode) LookupByIndex ¶
func (n PathedPBNode) LookupByIndex(idx int64) (ipld.Node, error)
func (PathedPBNode) LookupByNode ¶
func (n PathedPBNode) LookupByNode(key ipld.Node) (ipld.Node, error)
func (PathedPBNode) LookupBySegment ¶
func (n PathedPBNode) LookupBySegment(seg ipld.PathSegment) (ipld.Node, error)
func (PathedPBNode) LookupByString ¶
func (n PathedPBNode) LookupByString(key string) (ipld.Node, error)
LookupByString looks for the key in the list of links with a matching name
func (PathedPBNode) MapIterator ¶
func (n PathedPBNode) MapIterator() ipld.MapIterator
func (PathedPBNode) Prototype ¶
func (n PathedPBNode) Prototype() ipld.NodePrototype
func (PathedPBNode) Representation ¶
func (n PathedPBNode) Representation() ipld.Node
func (PathedPBNode) Substrate ¶
func (n PathedPBNode) Substrate() ipld.Node
Substrate returns the underlying PBNode -- note: only the substrate will encode successfully to protobuf if writing
Directories ¶
Path | Synopsis |
---|---|
Package data provides tools for working with the UnixFS data structure that is encoded in the "Data" field of the larger a DagPB encoded IPLD node.
|
Package data provides tools for working with the UnixFS data structure that is encoded in the "Data" field of the larger a DagPB encoded IPLD node. |
builder/quick
Package quickbuilder is designed as a replacement for the existing ipfs-files constructor for a simple way to generate synthetic directory trees.
|
Package quickbuilder is designed as a replacement for the existing ipfs-files constructor for a simple way to generate synthetic directory trees. |
Package test provides ADL testing of the ipld specification around * traversal making use of match subsets * largeByteNode readers
|
Package test provides ADL testing of the ipld specification around * traversal making use of match subsets * largeByteNode readers |