MCPcopy Index your code
hub / github.com/aptly-dev/aptly / Key

Method Key

deb/package.go:217–223  ·  view source on GitHub ↗

Key returns unique key identifying package

(prefix string)

Source from the content-addressed store, hash-verified

215
216// Key returns unique key identifying package
217func (p *Package) Key(prefix string) []byte {
218 if p.V06Plus {
219 return []byte(fmt.Sprintf("%sP%s %s %s %08x", prefix, p.Architecture, p.Name, p.Version, p.FilesHash))
220 }
221
222 return p.ShortKey(prefix)
223}
224
225// ShortKey returns key for the package that should be unique in one list
226func (p *Package) ShortKey(prefix string) []byte {

Callers 15

ExtendedStanzaMethod · 0.95
KeysByPrefixMethod · 0.45
FetchByPrefixMethod · 0.45
HasPrefixMethod · 0.45
ProcessByPrefixMethod · 0.45
HasMethod · 0.45
MarshalJSONMethod · 0.45
TestKeyMethod · 0.45
TestRefKeyMethod · 0.45
TestKeyMethod · 0.45

Calls 1

ShortKeyMethod · 0.95

Tested by 15

TestKeyMethod · 0.36
TestRefKeyMethod · 0.36
TestKeyMethod · 0.36
SetUpTestMethod · 0.36
TestLoadPre0_6Method · 0.36
TestNewPackageRefListMethod · 0.36
TestKeyMethod · 0.36
TestRefKeyMethod · 0.36
TestKeyMethod · 0.36
TestRefKeyMethod · 0.36
TestKeyMethod · 0.36