(wholeRef blob.Ref)
| 1336 | } |
| 1337 | |
| 1338 | func (x *Index) existingFileSchemas(wholeRef blob.Ref) (schemaRefs []blob.Ref, err error) { |
| 1339 | it := x.queryPrefix(keyWholeToFileRef, wholeRef) |
| 1340 | defer closeIterator(it, &err) |
| 1341 | for it.Next() { |
| 1342 | keyPart := strings.Split(it.Key(), "|")[1:] |
| 1343 | if len(keyPart) < 2 { |
| 1344 | continue |
| 1345 | } |
| 1346 | ref, ok := blob.Parse(keyPart[1]) |
| 1347 | if ok { |
| 1348 | schemaRefs = append(schemaRefs, ref) |
| 1349 | } |
| 1350 | } |
| 1351 | return schemaRefs, nil |
| 1352 | } |
| 1353 | |
| 1354 | // WholeRefToFile maps a file contents blobRef (a "wholeRef"), to the file schemas with those contents. |
| 1355 | type WholeRefToFile map[string][]blob.Ref |
no test coverage detected