func NewEncodedObjectLookupIter(
	storage EncodedObjectStorer, t plumbing.ObjectType, series []plumbing.Hash) *EncodedObjectLookupIter {
	return &EncodedObjectLookupIter{
		storage: storage,
		series:  series,
		t:       t,
	}
}
NewEncodedObjectLookupIter returns an object iterator given an object storage
and a slice of object hashes.
package storer
import (
	"errors"
	"io"
	"time"
	"gopkg.in/src-d/go-git.v4/plumbing"
)
var (
	ErrStop = errors.New("stop iter")
)
type EncodedObjectStorer interface {
	NewEncodedObject() plumbing.EncodedObject
	SetEncodedObject(plumbing.EncodedObject) (plumbing.Hash, error)
	EncodedObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
	IterEncodedObjects(plumbing.ObjectType) (EncodedObjectIter, error)
	HasEncodedObject(plumbing.Hash) error
}
type DeltaObjectStorer interface {
	DeltaObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
}
type Transactioner interface {
	Begin() Transaction
}
type LooseObjectStorer interface {
	ForEachObjectHash(func(plumbing.Hash) error) error
	LooseObjectTime(plumbing.Hash) (time.Time, error)
	DeleteLooseObject(plumbing.Hash) error
}
type PackedObjectStorer interface {
	ObjectPacks() ([]plumbing.Hash, error)
	DeleteOldObjectPackAndIndex(plumbing.Hash, time.Time) error
}
type PackfileWriter interface {
	PackfileWriter() (io.WriteCloser, error)
}
type EncodedObjectIter interface {
	Next() (plumbing.EncodedObject, error)
	ForEach(func(plumbing.EncodedObject) error) error
	Close()
}
type Transaction interface {
	SetEncodedObject(plumbing.EncodedObject) (plumbing.Hash, error)
	EncodedObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
	Commit() error
	Rollback() error
}
type EncodedObjectLookupIter struct {
	storage EncodedObjectStorer
	series  []plumbing.Hash
	t       plumbing.ObjectType
	pos     int
}