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

Method ByStoragePrefixDistribution

deb/publish.go:1451–1463  ·  view source on GitHub ↗

ByStoragePrefixDistribution looks up repository by storage, prefix & distribution

(storage, prefix, distribution string)

Source from the content-addressed store, hash-verified

1449
1450// ByStoragePrefixDistribution looks up repository by storage, prefix & distribution
1451func (collection *PublishedRepoCollection) ByStoragePrefixDistribution(storage, prefix, distribution string) (*PublishedRepo, error) {
1452 collection.loadList()
1453
1454 for _, r := range collection.list {
1455 if r.Prefix == prefix && r.Distribution == distribution && r.Storage == storage {
1456 return r, nil
1457 }
1458 }
1459 if storage != "" {
1460 storage += ":"
1461 }
1462 return nil, fmt.Errorf("published repo with storage:prefix/distribution %s%s/%s not found", storage, prefix, distribution)
1463}
1464
1465// ByUUID looks up repository by uuid
1466func (collection *PublishedRepoCollection) ByUUID(uuid string) (*PublishedRepo, error) {

Callers 15

TestLoadPre0_6Method · 0.95
TestRemoveRepo1and2Method · 0.95
TestRemoveRepo3Method · 0.95
TestRemoveRepo5Method · 0.95
RemoveMethod · 0.95
aptlyPublishSourceUpdateFunction · 0.80
aptlyPublishSourceRemoveFunction · 0.80
aptlyPublishSourceAddFunction · 0.80

Calls 1

loadListMethod · 0.95

Tested by 7

TestLoadPre0_6Method · 0.76
TestRemoveRepo1and2Method · 0.76
TestRemoveRepo3Method · 0.76
TestRemoveRepo5Method · 0.76