Package storer defines the interfaces to store objects, references, etc.
ErrMaxResolveRecursion is returned by ResolveReference is MaxResolveRecursion is exceeded
ForEachIterator is a helper function to build iterators without need to rewrite the same ForEach function each time.
ResolveReference resolves a SymbolicReference to a HashReference.
DeltaObjectStorer is an EncodedObjectStorer that can return delta objects.
EncodedObjectIter is a generic closable interface for iterating over objects.
NewMultiEncodedObjectIter returns an object iterator for the given slice of EncodedObjectIters.
type EncodedObjectLookupIter struct { }
EncodedObjectLookupIter implements EncodedObjectIter. It iterates over a series of object hashes and yields their associated objects by retrieving each one from object storage. The retrievals are lazy and only occur when the iterator moves forward with a call to Next().
The EncodedObjectLookupIter must be closed with a call to Close() when it is no longer needed.
NewEncodedObjectLookupIter returns an object iterator given an object storage and a slice of object hashes.
Close releases any resources used by the iterator.
ForEach call the cb function for each object contained on this iter until an error happens or the end of the iter is reached. If ErrStop is sent the iteration is stop but no error is returned. The iterator is closed.
Next returns the next object from the iterator. If the iterator has reached the end it will return io.EOF as an error. If the object can't be found in the object storage, it will return plumbing.ErrObjectNotFound as an error. If the object is retrieved successfully error will be nil.
type EncodedObjectSliceIter struct { }
EncodedObjectSliceIter implements EncodedObjectIter. It iterates over a series of objects stored in a slice and yields each one in turn when Next() is called.
The EncodedObjectSliceIter must be closed with a call to Close() when it is no longer needed.
NewEncodedObjectSliceIter returns an object iterator for the given slice of objects.
Close releases any resources used by the iterator.
ForEach call the cb function for each object contained on this iter until an error happens or the end of the iter is reached. If ErrStop is sent the iteration is stop but no error is returned. The iterator is closed.
Next returns the next object from the iterator. If the iterator has reached the end it will return io.EOF as an error. If the object is retrieved successfully error will be nil.
EncodedObjectStorer generic storage of objects
type FilesystemStorer interface { Filesystem() billy.Filesystem }
FilesystemStorer is a storer that can be used to store objects and references in a filesystem. It is used by the filesystem storage.
IndexStorer generic storage of index.Index
type Initializer interface { Init() error }
Initializer should be implemented by storers that require to perform any operation when creating a new repository (i.e. git init).
LooseObjectStorer is an optional interface for managing "loose" objects, i.e. those not in packfiles.
type MultiEncodedObjectIter struct { }
MultiEncodedObjectIter implements EncodedObjectIter. It iterates over several EncodedObjectIter,
The MultiObjectIter must be closed with a call to Close() when it is no longer needed.
Close releases any resources used by the iterator.
ForEach call the cb function for each object contained on this iter until an error happens or the end of the iter is reached. If ErrStop is sent the iteration is stop but no error is returned. The iterator is closed.
Next returns the next object from the iterator, if one iterator reach io.EOF is removed and the next one is used.
type MultiReferenceIter struct { }
MultiReferenceIter implements ReferenceIter. It iterates over several ReferenceIter,
The MultiReferenceIter must be closed with a call to Close() when it is no longer needed.
Close releases any resources used by the iterator.
ForEach call the cb function for each reference contained on this iter until an error happens or the end of the iter is reached. If ErrStop is sent the iteration is stop but no error is returned. The iterator is closed.
Next returns the next reference from the iterator, if one iterator reach io.EOF is removed and the next one is used.
PackedObjectStorer is an optional interface for managing objects in packfiles.
PackfileWriter is an optional method for ObjectStorer, it enables directly writing a packfile to storage.
ReferenceIter is a generic closable interface for iterating over references.
NewMultiReferenceIter returns an reference iterator for the given slice of EncodedObjectIters.
NewReferenceFilteredIter returns a reference iterator for the given reference Iterator. This iterator will iterate only references that accomplish the provided function.
NewReferenceSliceIter returns a reference iterator for the given slice of objects.
type ReferenceSliceIter struct { }
ReferenceSliceIter implements ReferenceIter. It iterates over a series of references stored in a slice and yields each one in turn when Next() is called.
The ReferenceSliceIter must be closed with a call to Close() when it is no longer needed.
Close releases any resources used by the iterator.
ForEach call the cb function for each reference contained on this iter until an error happens or the end of the iter is reached. If ErrStop is sent the iteration is stop but no error is returned. The iterator is closed.
Next returns the next reference from the iterator. If the iterator has reached the end it will return io.EOF as an error.
ReferenceStorer is a generic storage of references.
ShallowStorer is a storage of references to shallow commits by hash, meaning that these commits have missing parents because of a shallow fetch.
Storer is a basic storer for encoded objects and references.
Transaction is an in-progress storage transaction. A transaction must end with a call to Commit or Rollback.
Transactioner is a optional method for ObjectStorer, it enables transactional read and write operations.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4