IterIDs implements the interface objinterface.Collection.
(ctx context.Context, callback func(identifier id.Id) (stop bool, err error))
| 89 | |
| 90 | // IterIDs implements the interface objinterface.Collection. |
| 91 | func (pgc *Collection) IterIDs(ctx context.Context, callback func(identifier id.Id) (stop bool, err error)) error { |
| 92 | err := pgc.underlyingMap.IterAll(ctx, func(k string, _ hash.Hash) error { |
| 93 | stop, err := callback(id.Id(k)) |
| 94 | if err != nil { |
| 95 | return err |
| 96 | } else if stop { |
| 97 | return io.EOF |
| 98 | } else { |
| 99 | return nil |
| 100 | } |
| 101 | }) |
| 102 | return err |
| 103 | } |
| 104 | |
| 105 | // PutRootObject implements the interface objinterface.Collection. |
| 106 | func (pgc *Collection) PutRootObject(ctx context.Context, rootObj objinterface.RootObject) error { |