(ctx context.Context, fetcher *missTrackFetcher, schemaBlob *schema.Blob, mm *mutationMap)
| 331 | } |
| 332 | |
| 333 | func (ix *Index) populateMutationMapForSchema(ctx context.Context, fetcher *missTrackFetcher, schemaBlob *schema.Blob, mm *mutationMap) error { |
| 334 | switch schemaBlob.Type() { |
| 335 | case schema.TypePermanode: |
| 336 | _, err := ix.verifySignature(ctx, fetcher, schemaBlob) |
| 337 | return err |
| 338 | case schema.TypeClaim: |
| 339 | vr, err := ix.verifySignature(ctx, fetcher, schemaBlob) |
| 340 | if err != nil { |
| 341 | return err |
| 342 | } |
| 343 | return ix.populateClaim(ctx, fetcher, schemaBlob, vr, mm) |
| 344 | case schema.TypeFile: |
| 345 | return ix.populateFile(ctx, fetcher, schemaBlob, mm) |
| 346 | case schema.TypeDirectory: |
| 347 | return ix.populateDir(ctx, fetcher, schemaBlob, mm) |
| 348 | default: |
| 349 | return nil |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | // populateMutationMap populates keys & values that will be committed |
| 354 | // into the returned map. |
no test coverage detected