local

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PatchExt is used to ignore tmp files during a pull.
	PatchExt = ".buckpatch"
)

Variables

This section is empty.

Functions

func Ignore

func Ignore(pth string) bool

Ignore returns true if the path contains an ignored file.

Types

type Bucket

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

Bucket tracks a local bucket tree structure.

func NewBucket

func NewBucket(pth string, layout options.Layout) (*Bucket, error)

NewBucket creates a new bucket with the given path.

func (*Bucket) Archive

func (b *Bucket) Archive(ctx context.Context) error

Archive creates an archive describing the current path.

func (*Bucket) ArchiveFile

func (b *Bucket) ArchiveFile(ctx context.Context, pth string, name string) error

ArchiveFile creates an archive describing a directory containing reader.

func (*Bucket) Diff

func (b *Bucket) Diff(ctx context.Context, pth string) (diff []*dagutils.Change, err error)

Diff returns a list of changes that are present in pth compared to the current archive.

func (*Bucket) Get

func (b *Bucket) Get(ctx context.Context, c cid.Cid) (ipld.Node, error)

Get returns the node at cid from the current archive.

func (*Bucket) HashFile

func (b *Bucket) HashFile(pth string) (cid.Cid, error)

HashFile returns the cid of the file at path.

func (*Bucket) Path

func (b *Bucket) Path() path.Resolved

Path returns the current archive's root cid.

func (*Bucket) SetCidVersion added in v1.0.7

func (b *Bucket) SetCidVersion(v int)

CidVersion returns the configured cid version (0 or 1). The default is 1.

Jump to

Keyboard shortcuts

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