(ctx context.Context, r contentReader, oid ID, tracker *contentIDTracker, callbackFunc func(contentID content.ID) error)
| 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 { |
| 246 | return iterateIndirectObjectContents(ctx, r, indexObjectID, tracker, callbackFunc) |
| 247 | } |
| 248 | |
| 249 | if contentID, _, ok := oid.ContentID(); ok { |
| 250 | if err := callbackFunc(contentID); err != nil { |
| 251 | return err |
| 252 | } |
| 253 | |
| 254 | tracker.addContentID(contentID) |
| 255 | |
| 256 | return nil |
| 257 | } |
| 258 | |
| 259 | return errors.Errorf("unrecognized object type: %v", oid) |
| 260 | } |
| 261 | |
| 262 | type indirectObject struct { |
| 263 | StreamID string `json:"stream"` |
no test coverage detected