Documentation ¶
Overview ¶
Package filesystem is a storage backend base on filesystems
Index ¶
- type ConfigStorage
- type ObjectStorage
- func (s *ObjectStorage) IterObjects(t plumbing.ObjectType) (storer.ObjectIter, error)
- func (s *ObjectStorage) NewObject() plumbing.Object
- func (s *ObjectStorage) Object(t plumbing.ObjectType, h plumbing.Hash) (plumbing.Object, error)
- func (s *ObjectStorage) PackfileWriter() (io.WriteCloser, error)
- func (s *ObjectStorage) SetObject(o plumbing.Object) (plumbing.Hash, error)
- type ReferenceStorage
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigStorage ¶
type ConfigStorage struct {
// contains filtered or unexported fields
}
type ObjectStorage ¶
type ObjectStorage struct {
// contains filtered or unexported fields
}
func (*ObjectStorage) IterObjects ¶
func (s *ObjectStorage) IterObjects(t plumbing.ObjectType) (storer.ObjectIter, error)
Iter returns an iterator for all the objects in the packfile with the given type.
func (*ObjectStorage) NewObject ¶
func (s *ObjectStorage) NewObject() plumbing.Object
func (*ObjectStorage) Object ¶
func (s *ObjectStorage) Object(t plumbing.ObjectType, h plumbing.Hash) (plumbing.Object, error)
Get returns the object with the given hash, by searching for it in the packfile and the git object directories.
func (*ObjectStorage) PackfileWriter ¶
func (s *ObjectStorage) PackfileWriter() (io.WriteCloser, error)
type ReferenceStorage ¶
type ReferenceStorage struct {
// contains filtered or unexported fields
}
func (*ReferenceStorage) IterReferences ¶
func (r *ReferenceStorage) IterReferences() (storer.ReferenceIter, error)
func (*ReferenceStorage) Reference ¶
func (r *ReferenceStorage) Reference(n plumbing.ReferenceName) (*plumbing.Reference, error)
func (*ReferenceStorage) SetReference ¶
func (r *ReferenceStorage) SetReference(ref *plumbing.Reference) error
type Storage ¶
type Storage struct { ObjectStorage ReferenceStorage ConfigStorage }
Storage is an implementation of git.Storer that stores data on disk in the standard git format (this is, the .git directory). Zero values of this type are not safe to use, see the NewStorage function below.
func NewStorage ¶
func NewStorage(fs fs.Filesystem) (*Storage, error)
NewStorage returns a new Storage backed by a given `fs.Filesystem`
Click to show internal directories.
Click to hide internal directories.