Documentation
¶
Index ¶
- Constants
- func Ignore(pth string) bool
- type Bucket
- func (b *Bucket) Close() error
- func (b *Bucket) Diff(ctx context.Context, pth string) (diff []*dagutils.Change, err error)
- func (b *Bucket) Get(ctx context.Context, c cid.Cid) (ipld.Node, error)
- func (b *Bucket) HashFile(pth string) (cid.Cid, error)
- func (b *Bucket) MatchPath(pth string, local, remote cid.Cid) (bool, error)
- func (b *Bucket) RemovePath(ctx context.Context, pth string) error
- func (b *Bucket) Root() (local, remote cid.Cid, err error)
- func (b *Bucket) Save(ctx context.Context) error
- func (b *Bucket) SaveFile(ctx context.Context, pth string, name string) error
- func (b *Bucket) SetCidVersion(v int)
- func (b *Bucket) SetRemotePath(pth string, remote cid.Cid) error
Constants ¶
View Source
const (
// PatchExt is used to ignore tmp files during a pull.
PatchExt = ".buckpatch"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket tracks a local bucket tree structure.
func (*Bucket) Diff ¶
Diff returns a list of changes that are present in path compared to the bucket.
func (*Bucket) HashFile ¶
HashFile returns the cid of the file at path. This method does not alter the bucket.
func (*Bucket) MatchPath ¶ added in v1.0.9
MatchPath returns whether or not the path exists and has matching local and remote cids.
func (*Bucket) RemovePath ¶ added in v1.0.9
RemovePath removes a local path map from the store.
func (*Bucket) Save ¶ added in v1.0.9
Save saves the bucket as a node describing the file tree at the current path.
func (*Bucket) SaveFile ¶ added in v1.0.9
SaveFile saves the bucket as a node describing a directory containing reader.
func (*Bucket) SetCidVersion ¶ added in v1.0.7
CidVersion returns the configured cid version (0 or 1). The default version is 1.
Click to show internal directories.
Click to hide internal directories.