carutil

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const UnixfsChunkSize uint64 = 1 << 20
View Source
const UnixfsLinksPerLevel = 1 << 10

Variables

This section is empty.

Functions

func BuildFileNode

func BuildFileNode(ctx context.Context, item Finfo, bufDs ipld.DAGService, cidBuilder cid.Builder) (node ipld.Node, err error)

Types

type CidMapValue

type CidMapValue struct {
	IsDir bool
	Cid   string
}

type FSBuilder

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

func NewFSBuilder

func NewFSBuilder(root *dag.ProtoNode, ds ipld.DAGService) *FSBuilder

func (*FSBuilder) Build

func (b *FSBuilder) Build() (rootn *FsNode, err error)

type Finfo

type Finfo struct {
	Path  string
	Size  int64
	Start int64
	End   int64
}

type FsNode

type FsNode struct {
	Name string
	Hash string
	Size uint64
	Link []FsNode
}

func GenerateCar

func GenerateCar(ctx context.Context, fileList []Finfo, parentPath string, tmpDir string, output io.Writer) (ipldDag *FsNode, cid string, cidMap map[string]CidMapValue, err error)

Jump to

Keyboard shortcuts

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