Versions in this module Expand all Collapse all v0 v0.7.0 May 26, 2023 Changes in this version + const TDirectory + const TFile + const THAMTShard + const TMetadata + const TRaw + const TSymlink + const TTokenMeta + var ErrMalformedFileFormat = errors.New("malformed data in file format") + var ErrMetadataAccessDenied = errors.New("Token metadata can not be accessed by default. Use --meta option.") + var ErrNotMetadataRoot = errors.New("expected token metadata protobuf dag node") + var ErrUnexpectedLinks = errors.New("expected more than two links under the given dag node") + var ErrUnrecognizedType = errors.New("unrecognized node type") + func BytesForMetadata(m *Metadata) ([]byte, error) + func DataSize(data []byte) (uint64, error) + func EmptyDirNode() *dag.ProtoNode + func EmptyFileNode() *dag.ProtoNode + func FilePBData(data []byte, totalsize uint64) []byte + func FolderPBData() []byte + func FromBytes(data []byte) (*pb.Data, error) + func GetFSType(n *dag.ProtoNode) (pb.Data_DataType, error) + func GetMetaSubdagRoot(ctx context.Context, n ipld.Node, serv ipld.NodeGetter) (ipld.Node, error) + func HAMTShardData(data []byte, fanout uint64, hashType uint64) ([]byte, error) + func ReadUnixFSNodeData(node ipld.Node) (data []byte, err error) + func SymlinkData(path string) ([]byte, error) + func UnwrapData(data []byte) ([]byte, error) + func WrapData(b []byte) []byte + type DagMetaNodes struct + DataNode ipld.Node + MetaNode ipld.Node + func GetChildrenForDagWithMeta(ctx context.Context, nd ipld.Node, ds ipld.DAGService) (*DagMetaNodes, error) + type FSNode struct + func ExtractFSNode(node ipld.Node) (*FSNode, error) + func FSNodeFromBytes(b []byte) (*FSNode, error) + func NewFSNode(dataType pb.Data_DataType) *FSNode + func (n *FSNode) AddBlockSize(s uint64) + func (n *FSNode) BlockSize(i int) uint64 + func (n *FSNode) BlockSizes() []uint64 + func (n *FSNode) Data() []byte + func (n *FSNode) Fanout() uint64 + func (n *FSNode) FileSize() uint64 + func (n *FSNode) GetBytes() ([]byte, error) + func (n *FSNode) HashType() uint64 + func (n *FSNode) IsDir() bool + func (n *FSNode) Metadata() []byte + func (n *FSNode) NumChildren() int + func (n *FSNode) RemoveAllBlockSizes() + func (n *FSNode) RemoveBlockSize(i int) + func (n *FSNode) SetData(newData []byte) + func (n *FSNode) Type() pb.Data_DataType + func (n *FSNode) UpdateFilesize(filesizeDiff int64) + type LinkResult struct + Err error + Link *ipld.Link + type Metadata struct + MimeType string + Size uint64 + func MetadataFromBytes(b []byte) (*Metadata, error) + func (m *Metadata) Bytes() ([]byte, error)