(ctx context.Context, cr contentReader, indexObjectID ID, tracker *contentIDTracker, callbackFunc func(contentID content.ID) error)
| 222 | } |
| 223 | |
| 224 | func iterateIndirectObjectContents(ctx context.Context, cr contentReader, indexObjectID ID, tracker *contentIDTracker, callbackFunc func(contentID content.ID) error) error { |
| 225 | if err := iterateBackingContents(ctx, cr, indexObjectID, tracker, callbackFunc); err != nil { |
| 226 | return errors.Wrap(err, "unable to read index") |
| 227 | } |
| 228 | |
| 229 | seekTable, err := LoadIndexObject(ctx, cr, indexObjectID) |
| 230 | if err != nil { |
| 231 | return err |
| 232 | } |
| 233 | |
| 234 | for _, m := range seekTable { |
| 235 | err := iterateBackingContents(ctx, cr, m.Object, tracker, callbackFunc) |
| 236 | if err != nil { |
| 237 | return err |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | return nil |
| 242 | } |
| 243 | |
| 244 | func iterateBackingContents(ctx context.Context, r contentReader, oid ID, tracker *contentIDTracker, callbackFunc func(contentID content.ID) error) error { |
| 245 | if indexObjectID, ok := oid.IndexObjectID(); ok { |
no test coverage detected