Debian Codegraph @

pack/index_version.go

raw
1 package pack
2
3 type IndexVersion interface {
4 // Name returns the name of the object located at the given offset "at",
5 // in the Index file "idx".
6 //
7 // It returns an error if the object at that location could not be
8 // parsed.
9 Name(idx *Index, at int64) ([]byte, error)
10
11 // Entry parses and returns the full *IndexEntry located at the offset
12 // "at" in the Index file "idx".
13 //
14 // If there was an error parsing the IndexEntry at that location, it
15 // will be returned.
16 Entry(idx *Index, at int64) (*IndexEntry, error)
17
18 // Width returns the number of bytes occupied by the header of a
19 // particular index version.
20 Width() int64
21 }