daggen

package
v0.2.40 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0, MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyNode error = errors.New("fake fs Node")

Functions

func ResolveDirectoryTree added in v0.1.0

func ResolveDirectoryTree(currentID uint64,
	dirCache map[uint64]*DirectoryData,
	childrenCache map[uint64][]uint64,
) (*format.Link, error)

func UnmarshallToBlocks added in v0.1.0

func UnmarshallToBlocks(data []byte) (cid.Cid, []blocks.Block, error)

Types

type DirectoryData added in v0.1.0

type DirectoryData struct {
	Directory model.Directory
	Node      format.Node
	// contains filtered or unexported fields
}

func NewDirectoryData added in v0.1.0

func NewDirectoryData() DirectoryData

func (*DirectoryData) AddItem added in v0.1.0

func (d *DirectoryData) AddItem(name string, c cid.Cid, length uint64) error
func (d *DirectoryData) AddItemFromLinks(name string, links []format.Link) (cid.Cid, error)

func (*DirectoryData) MarshalBinary added in v0.1.0

func (d *DirectoryData) MarshalBinary() ([]byte, error)

func (*DirectoryData) UnmarshallBinary added in v0.1.0

func (d *DirectoryData) UnmarshallBinary(data []byte) error

type DummyNode

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

func NewDummyNode

func NewDummyNode(size uint64, cid cid.Cid) DummyNode

func (DummyNode) Cid

func (f DummyNode) Cid() cid.Cid

func (DummyNode) Copy

func (f DummyNode) Copy() ipld.Node
func (f DummyNode) Links() []*ipld.Link

func (DummyNode) Loggable

func (f DummyNode) Loggable() map[string]interface{}

func (DummyNode) RawData

func (f DummyNode) RawData() []byte

func (DummyNode) Resolve

func (f DummyNode) Resolve(path []string) (interface{}, []string, error)
func (f DummyNode) ResolveLink(path []string) (*ipld.Link, []string, error)

func (DummyNode) Size

func (f DummyNode) Size() (uint64, error)

func (DummyNode) Stat

func (f DummyNode) Stat() (*ipld.NodeStat, error)

func (DummyNode) String

func (f DummyNode) String() string

func (DummyNode) Tree

func (f DummyNode) Tree(path string, depth int) []string

Jump to

Keyboard shortcuts

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