Documentation ¶
Index ¶
- Variables
- func NewObjectStorage(config *storage.Config) storer.EncodedObjectStorer
- func NewReferenceStorage(config *storage.Config) storer.ReferenceStorer
- func NewStorage(config *storage.Config) (gitstorage.Storer, error)
- type ChaintreeStorage
- type ObjectStorage
- func (s *ObjectStorage) Begin() storer.Transaction
- func (s *ObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error)
- func (s *ObjectStorage) EncodedObjectSize(h plumbing.Hash) (size int64, err error)
- func (s *ObjectStorage) HasEncodedObject(h plumbing.Hash) (err error)
- func (s *ObjectStorage) IterEncodedObjects(t plumbing.ObjectType) (storer.EncodedObjectIter, error)
- func (s *ObjectStorage) PackfileWriter() (io.WriteCloser, error)
- func (s *ObjectStorage) SetEncodedObject(o plumbing.EncodedObject) (plumbing.Hash, error)
- func (s *ObjectStorage) SetEncodedObjectTxn(o plumbing.EncodedObject) (*transactions.Transaction, error)
- type ObjectTransaction
- type ReferenceStorage
- func (s *ReferenceStorage) CheckAndSetReference(ref *plumbing.Reference, old *plumbing.Reference) error
- func (s *ReferenceStorage) CountLooseRefs() (int, error)
- func (s *ReferenceStorage) IterReferences() (storer.ReferenceIter, error)
- func (r *ReferenceStorage) PackRefs() error
- func (s *ReferenceStorage) Reference(n plumbing.ReferenceName) (*plumbing.Reference, error)
- func (s *ReferenceStorage) RemoveReference(n plumbing.ReferenceName) error
- func (s *ReferenceStorage) SetReference(ref *plumbing.Reference) error
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 ¶
type ChaintreeStorage struct { storer.EncodedObjectStorer storer.ReferenceStorer storer.ShallowStorer storer.IndexStorer config.ConfigStorer }
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 (s *ObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error)
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 (ot *ObjectTransaction) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error)
func (*ObjectTransaction) Rollback ¶
func (ot *ObjectTransaction) Rollback() error
func (*ObjectTransaction) SetEncodedObject ¶
func (ot *ObjectTransaction) SetEncodedObject(o plumbing.EncodedObject) (plumbing.Hash, error)
type ReferenceStorage ¶
func (*ReferenceStorage) CheckAndSetReference ¶
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 ¶
func (s *ReferenceStorage) Reference(n plumbing.ReferenceName) (*plumbing.Reference, error)
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
Click to show internal directories.
Click to hide internal directories.