chaintree

package
v0.0.15-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RepoConfigPath = []string{"tree", "data", "dgit", "config"}

Functions

func NewObjectStorage

func NewObjectStorage(config *storage.Config) storer.EncodedObjectStorer

func NewReferenceStorage

func NewReferenceStorage(config *storage.Config) storer.ReferenceStorer

func NewStorage

func NewStorage(config *storage.Config) (gitstorage.Storer, error)

Types

type ChaintreeStorage

func (*ChaintreeStorage) Module

func (s *ChaintreeStorage) Module(_ string) (gitstorage.Storer, error)

func (*ChaintreeStorage) PackfileWriter

func (s *ChaintreeStorage) PackfileWriter() (io.WriteCloser, error)

type ObjectStorage

type ObjectStorage struct {
	*storage.ChaintreeObjectStorage
	// contains filtered or unexported fields
}

func (*ObjectStorage) Begin

func (s *ObjectStorage) Begin() storer.Transaction

func (*ObjectStorage) EncodedObject

func (*ObjectStorage) EncodedObjectSize

func (s *ObjectStorage) EncodedObjectSize(h plumbing.Hash) (size int64, err error)

func (*ObjectStorage) HasEncodedObject

func (s *ObjectStorage) HasEncodedObject(h plumbing.Hash) (err error)

func (*ObjectStorage) IterEncodedObjects

func (s *ObjectStorage) IterEncodedObjects(t plumbing.ObjectType) (storer.EncodedObjectIter, error)

func (*ObjectStorage) PackfileWriter

func (s *ObjectStorage) PackfileWriter() (io.WriteCloser, error)

func (*ObjectStorage) SetEncodedObject

func (s *ObjectStorage) SetEncodedObject(o plumbing.EncodedObject) (plumbing.Hash, error)

func (*ObjectStorage) SetEncodedObjectTxn

func (s *ObjectStorage) SetEncodedObjectTxn(o plumbing.EncodedObject) (*transactions.Transaction, error)

type ObjectTransaction

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

func (*ObjectTransaction) Commit

func (ot *ObjectTransaction) Commit() error

func (*ObjectTransaction) EncodedObject

func (*ObjectTransaction) Rollback

func (ot *ObjectTransaction) Rollback() error

func (*ObjectTransaction) SetEncodedObject

func (ot *ObjectTransaction) SetEncodedObject(o plumbing.EncodedObject) (plumbing.Hash, error)

type ReferenceStorage

type ReferenceStorage struct {
	*storage.Config
	// contains filtered or unexported fields
}

func (*ReferenceStorage) CheckAndSetReference

func (s *ReferenceStorage) CheckAndSetReference(ref *plumbing.Reference, old *plumbing.Reference) error

func (*ReferenceStorage) CountLooseRefs

func (s *ReferenceStorage) CountLooseRefs() (int, error)

func (*ReferenceStorage) IterReferences

func (s *ReferenceStorage) IterReferences() (storer.ReferenceIter, error)

func (*ReferenceStorage) PackRefs

func (r *ReferenceStorage) PackRefs() error

func (*ReferenceStorage) Reference

Reference returns the reference for a given reference name.

func (*ReferenceStorage) RemoveReference

func (s *ReferenceStorage) RemoveReference(n plumbing.ReferenceName) error

func (*ReferenceStorage) SetReference

func (s *ReferenceStorage) SetReference(ref *plumbing.Reference) error

Jump to

Keyboard shortcuts

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