tree

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmpty   = errors.New("file is empty")
	ErrMissing = errors.New("required file is missing")
)

Functions

func Delete

func Delete(ctx context.Context, cli client.Client, path string, priv *ecdsa.PrivateKey) error

Delete all hashes under a root

func Download

func Download(ctx context.Context, cli client.Client, path string, f io.Writer) error

TODO: make multi-threaded

func Upload

func Upload(
	ctx context.Context, cli client.Client, priv *ecdsa.PrivateKey,
	space string, f io.Reader, chunkSize int,
) (string, error)

Types

type Root

type Root struct {
	Contents []byte   `json:"contents"`
	Children []string `json:"children"`
}

Jump to

Keyboard shortcuts

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