Plain functionality in service methods.
- License:
- MIT
- Source:
Methods
(inner) countPackage() → {Promise}
Count number of entries in database.
- Source:
Returns:
object with count attribute or error
- Type
- Promise
(inner) countPerCreator()
Count objects per creator.
- Source:
Returns:
array of _id count tuples
(inner) deletePackage(packageName, packageVersion, packageArch, packageFamily, packageHash) → {Promise}
Delete a single package from database.
Parameters:
Name | Type | Description |
---|---|---|
packageName |
string | Name of the package |
packageVersion |
string | Version of the package |
packageArch |
string | Architecture of the package |
packageFamily |
string | Family of the package |
packageHash |
string | SHA hash of the package |
- Source:
Returns:
OK or error object
- Type
- Promise
(inner) deletePackageById(packageId) → {Promise}
Delete a single package from database.
Parameters:
Name | Type | Description |
---|---|---|
packageId |
string | ID of the package |
- Source:
Returns:
OK or error object
- Type
- Promise
(inner) healthCheck() → {Promise}
Check health of system.
- Source:
Returns:
boolean true if all is OK or error
- Type
- Promise
(inner) listPackage(packageName, packageVersion, packageArch, packageFamily) → {Promise}
List package data for given combination.
Parameters:
Name | Type | Description |
---|---|---|
packageName |
string | Name of the package |
packageVersion |
string | Version of the package |
packageArch |
string | Architecture of the package |
packageFamily |
string | Family of the package |
- Source:
Returns:
array of entries
- Type
- Promise
(inner) listPackageSingle(packageId) → {Promise}
List data for a single package.
Parameters:
Name | Type | Description |
---|---|---|
packageId |
string | ID of the package |
- Source:
Returns:
object with entry data
- Type
- Promise
(inner) listPackages(skip, count, sort, direction, age) → {Promise}
List all packages with maximum amount and entries to skip.
Parameters:
Name | Type | Description |
---|---|---|
skip |
number | Skip first replies |
count |
number | Limit replies |
sort |
string | Sort by property |
direction |
string | Sort up or down |
age |
number | maximum age of tsupdated in days to be included |
- Source:
Returns:
array of entries
- Type
- Promise
(inner) listPackagesFull(count) → {Promise}
List all packages including personal data for admin usage.
Parameters:
Name | Type | Description |
---|---|---|
count |
string | Limit replies |
- Source:
Returns:
array of entries
- Type
- Promise
(inner) listPagePackages(page, size, sorters, _filter) → {Promise}
List all packages, optimized for UI pagination.
Parameters:
Name | Type | Description |
---|---|---|
page |
number | Skip first replies |
size |
number | Limit replies |
sorters |
string | Sort by property |
_filter |
string | optional filter |
- Source:
Returns:
array of entries and number of possible pages with given size value
- Type
- Promise
(inner) searchPackages(jsearch)
Search for packages by given query.
Parameters:
Name | Type | Description |
---|---|---|
jsearch |
string | json query |
- Source:
Returns:
array of entries
(inner) summaryArch()
Count objects per architecture.
- Source:
Returns:
object with count attribute
(inner) summaryFamily()
Count objects per family.
- Source:
Returns:
object with count attribute
(inner) validatePackage(packageName, packageVersion, packageArch, packageFamily, _packageSubFamily, packageHash, username) → {Promise}
Validate the package.
Parameters:
Name | Type | Description |
---|---|---|
packageName |
string | Name of the package |
packageVersion |
string | Version of the package |
packageArch |
string | Architecture of the package |
packageFamily |
string | Architecture of the package |
_packageSubFamily |
string | Optional subfamily string |
packageHash |
string | SHA hash of the package |
username |
string | The user asking for this, used for creator |
- Source:
Returns:
Package data
- Type
- Promise