dotgithub

package module
v0.0.0-...-e2e61c4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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()

func (ReferenceIterator) ForEach

func (iter ReferenceIterator) ForEach(fn func(*plumbing.Reference) error) error

func (ReferenceIterator) Next

func (iter ReferenceIterator) Next() (*plumbing.Reference, error)

type Store

type Store struct {
	Client          *github.Client
	Context         context.Context
	RepositoryName  string
	RepositoryOwner string
}

func (*Store) CheckAndSetReference

func (store *Store) CheckAndSetReference(new, old *plumbing.Reference) error

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) Config

func (store *Store) Config() (*config.Config, error)

func (*Store) CountLooseRefs

func (store *Store) CountLooseRefs() (int, error)

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

func (store *Store) EncodedObjectSize(plumbing.Hash) (int64, error)

EncodedObjectSize returns the plaintext size of the encoded object.

func (*Store) HasEncodedObject

func (store *Store) HasEncodedObject(plumbing.Hash) error

HasEncodedObject returns ErrObjNotFound if the object doesn't exist. If the object does exist, it returns nil.

func (*Store) Index

func (store *Store) Index() (*index.Index, error)

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) Module

func (store *Store) Module(name string) (storage.Storer, 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) PackRefs

func (store *Store) PackRefs() error

func (*Store) Reference

func (store *Store) Reference(name plumbing.ReferenceName) (*plumbing.Reference, error)

func (*Store) RemoveReference

func (store *Store) RemoveReference(plumbing.ReferenceName) error

func (*Store) SetConfig

func (store *Store) SetConfig(*config.Config) error

func (*Store) SetEncodedObject

func (store *Store) SetEncodedObject(plumbing.EncodedObject) (plumbing.Hash, error)

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) SetIndex

func (store *Store) SetIndex(*index.Index) error

func (*Store) SetReference

func (store *Store) SetReference(*plumbing.Reference) error

func (*Store) SetShallow

func (store *Store) SetShallow([]plumbing.Hash) error

storer.ShallowStorer

func (*Store) Shallow

func (store *Store) Shallow() ([]plumbing.Hash, error)

Jump to

Keyboard shortcuts

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