github.com/stffabi/git-lfs@v2.3.5-0.20180214015214-8eeaa8d88902+incompatible/git/odb/pack/index_version.go (about) 1 package pack 2 3 // IndexVersion is a constant type that represents the version of encoding used 4 // by a particular index version. 5 type IndexVersion interface { 6 // Name returns the name of the object located at the given offset "at", 7 // in the Index file "idx". 8 // 9 // It returns an error if the object at that location could not be 10 // parsed. 11 Name(idx *Index, at int64) ([]byte, error) 12 13 // Entry parses and returns the full *IndexEntry located at the offset 14 // "at" in the Index file "idx". 15 // 16 // If there was an error parsing the IndexEntry at that location, it 17 // will be returned. 18 Entry(idx *Index, at int64) (*IndexEntry, error) 19 20 // Width returns the number of bytes occupied by the header of a 21 // particular index version. 22 Width() int64 23 }