ReadAllClocksNoCheck goes over all entities matching Definition and read/witness the corresponding clocks so that the repo end up with correct clocks for the next write.
(def Definition, repo repository.ClockedRepo)
| 340 | // ReadAllClocksNoCheck goes over all entities matching Definition and read/witness the corresponding clocks so that the |
| 341 | // repo end up with correct clocks for the next write. |
| 342 | func ReadAllClocksNoCheck(def Definition, repo repository.ClockedRepo) error { |
| 343 | refPrefix := fmt.Sprintf("refs/%s/", def.Namespace) |
| 344 | |
| 345 | refs, err := repo.ListRefs(refPrefix) |
| 346 | if err != nil { |
| 347 | return err |
| 348 | } |
| 349 | |
| 350 | for _, ref := range refs { |
| 351 | err = readClockNoCheck(def, repo, ref) |
| 352 | if err != nil { |
| 353 | return err |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | return nil |
| 358 | } |
| 359 | |
| 360 | // Id return the Entity identifier |
| 361 | func (e *Entity) Id() entity.Id { |
no test coverage detected