Documentation
¶
Index ¶
- type ObjectIterator
- type ReferenceIterator
- type Store
- func (store *Store) CheckAndSetReference(new, old *plumbing.Reference) error
- func (store *Store) Config() (*config.Config, error)
- func (store *Store) CountLooseRefs() (int, error)
- func (store *Store) EncodedObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
- func (store *Store) EncodedObjectSize(plumbing.Hash) (int64, error)
- func (store *Store) HasEncodedObject(plumbing.Hash) error
- func (store *Store) Index() (*index.Index, error)
- func (store *Store) IterEncodedObjects(plumbing.ObjectType) (storer.EncodedObjectIter, error)
- func (store *Store) IterReferences() (storer.ReferenceIter, error)
- func (store *Store) Module(name string) (storage.Storer, error)
- func (store *Store) NewEncodedObject() plumbing.EncodedObject
- func (store *Store) PackRefs() error
- func (store *Store) Reference(name plumbing.ReferenceName) (*plumbing.Reference, error)
- func (store *Store) RemoveReference(plumbing.ReferenceName) error
- func (store *Store) SetConfig(*config.Config) error
- func (store *Store) SetEncodedObject(plumbing.EncodedObject) (plumbing.Hash, error)
- func (store *Store) SetIndex(*index.Index) error
- func (store *Store) SetReference(*plumbing.Reference) error
- func (store *Store) SetShallow([]plumbing.Hash) error
- func (store *Store) Shallow() ([]plumbing.Hash, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectIterator ¶
type ObjectIterator struct {
// contains filtered or unexported fields
}
func (ObjectIterator) Close ¶
func (iter ObjectIterator) Close()
func (ObjectIterator) ForEach ¶
func (iter ObjectIterator) ForEach(fn func(plumbing.EncodedObject) error) error
func (ObjectIterator) Next ¶
func (iter ObjectIterator) Next() (plumbing.EncodedObject, error)
type ReferenceIterator ¶
type ReferenceIterator struct {
// contains filtered or unexported fields
}
func (ReferenceIterator) Close ¶
func (iter ReferenceIterator) Close()
type Store ¶
type Store struct {
Client *github.Client
Context context.Context
RepositoryName string
RepositoryOwner string
}
func (*Store) CheckAndSetReference ¶
CheckAndSetReference sets the reference `new`, but if `old` is not `nil`, it first checks that the current stored value for `old.Name()` matches the given reference value in `old`. If not, it returns an error and doesn't update `new`.
func (*Store) CountLooseRefs ¶
func (*Store) EncodedObject ¶
func (store *Store) EncodedObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
EncodedObject gets an object by hash with the given plumbing.ObjectType. Implementors should return (nil, plumbing.ErrObjectNotFound) if an object doesn't exist with both the given hash and object type.
Valid plumbing.ObjectType values are CommitObject, BlobObject, TagObject, TreeObject and AnyObject. If plumbing.AnyObject is given, the object must be looked up regardless of its type.
func (*Store) EncodedObjectSize ¶
EncodedObjectSize returns the plaintext size of the encoded object.
func (*Store) HasEncodedObject ¶
HasEncodedObject returns ErrObjNotFound if the object doesn't exist. If the object does exist, it returns nil.
func (*Store) IterEncodedObjects ¶
func (store *Store) IterEncodedObjects(plumbing.ObjectType) (storer.EncodedObjectIter, error)
IterEncodedObjects returns a custom EncodedObjectStorer over all the object on the storage.
Valid plumbing.ObjectType values are CommitObject, BlobObject, TagObject,
func (*Store) IterReferences ¶
func (store *Store) IterReferences() (storer.ReferenceIter, error)
func (*Store) NewEncodedObject ¶
func (store *Store) NewEncodedObject() plumbing.EncodedObject
NewEncodedObject returns a new plumbing.EncodedObject, the real type of the object can be a custom implementation or the default one, plumbing.MemoryObject.
func (*Store) RemoveReference ¶
func (store *Store) RemoveReference(plumbing.ReferenceName) error
func (*Store) SetEncodedObject ¶
SetEncodedObject saves an object into the storage, the object should be create with the NewEncodedObject, method, and file if the type is not supported.
func (*Store) SetShallow ¶
storer.ShallowStorer