PackageCollection returns (or creates) new PackageCollection
()
| 33 | |
| 34 | // PackageCollection returns (or creates) new PackageCollection |
| 35 | func (factory *CollectionFactory) PackageCollection() *PackageCollection { |
| 36 | factory.Lock() |
| 37 | defer factory.Unlock() |
| 38 | |
| 39 | if factory.packages == nil { |
| 40 | factory.packages = NewPackageCollection(factory.db) |
| 41 | } |
| 42 | |
| 43 | return factory.packages |
| 44 | } |
| 45 | |
| 46 | // RemoteRepoCollection returns (or creates) new RemoteRepoCollection |
| 47 | func (factory *CollectionFactory) RemoteRepoCollection() *RemoteRepoCollection { |