SnapshotCollection returns (or creates) new SnapshotCollection
()
| 57 | |
| 58 | // SnapshotCollection returns (or creates) new SnapshotCollection |
| 59 | func (factory *CollectionFactory) SnapshotCollection() *SnapshotCollection { |
| 60 | factory.Lock() |
| 61 | defer factory.Unlock() |
| 62 | |
| 63 | if factory.snapshots == nil { |
| 64 | factory.snapshots = NewSnapshotCollection(factory.db) |
| 65 | } |
| 66 | |
| 67 | return factory.snapshots |
| 68 | } |
| 69 | |
| 70 | // LocalRepoCollection returns (or creates) new LocalRepoCollection |
| 71 | func (factory *CollectionFactory) LocalRepoCollection() *LocalRepoCollection { |