ByUUID looks up repository by uuid
(uuid string)
| 1464 | |
| 1465 | // ByUUID looks up repository by uuid |
| 1466 | func (collection *PublishedRepoCollection) ByUUID(uuid string) (*PublishedRepo, error) { |
| 1467 | collection.loadList() |
| 1468 | |
| 1469 | for _, r := range collection.list { |
| 1470 | if r.UUID == uuid { |
| 1471 | return r, nil |
| 1472 | } |
| 1473 | } |
| 1474 | return nil, fmt.Errorf("published repo with uuid %s not found", uuid) |
| 1475 | } |
| 1476 | |
| 1477 | // BySnapshot looks up repository by snapshot source |
| 1478 | func (collection *PublishedRepoCollection) BySnapshot(snapshot *Snapshot) []*PublishedRepo { |
no test coverage detected