-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mirror functionality to repositories service
- Loading branch information
Showing
2 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
const DbService = require("db-mixin"); | ||
const Membership = require("membership-mixin"); | ||
const ConfigLoader = require("config-mixin"); | ||
const { MoleculerClientError } = require("moleculer").Errors; | ||
|
||
|
||
/** | ||
* this is the git.actions service for tracking actions | ||
*/ | ||
|
||
module.exports = { | ||
// name of service | ||
name: "git.actions", | ||
// version of service | ||
version: 1, | ||
|
||
/** | ||
* Service Mixins | ||
* | ||
* @type {Array} | ||
* @property {DbService} DbService - Database mixin | ||
* @property {ConfigLoader} ConfigLoader - Config loader mixin | ||
*/ | ||
mixins: [ | ||
DbService({}), | ||
ConfigLoader([ | ||
'git.**' | ||
]), | ||
], | ||
|
||
/** | ||
* Service dependencies | ||
*/ | ||
dependencies: [], | ||
|
||
/** | ||
* Service settings | ||
* | ||
* @type {Object} | ||
*/ | ||
settings: { | ||
rest: true, | ||
|
||
fields: { | ||
|
||
|
||
// inject dbservice fields | ||
...DbService.FIELDS,// inject dbservice fields | ||
}, | ||
defaultPopulates: [], | ||
|
||
scopes: { | ||
...DbService.SCOPE, | ||
}, | ||
|
||
defaultScopes: [ | ||
...DbService.DSCOPE, | ||
], | ||
|
||
// default init config settings | ||
config: { | ||
|
||
} | ||
}, | ||
|
||
/** | ||
* service actions | ||
*/ | ||
actions: { | ||
|
||
}, | ||
|
||
/** | ||
* service events | ||
*/ | ||
events: { | ||
|
||
}, | ||
|
||
/** | ||
* service methods | ||
*/ | ||
methods: { | ||
|
||
}, | ||
|
||
|
||
/** | ||
* service created lifecycle event handler | ||
*/ | ||
created() { | ||
|
||
}, | ||
|
||
/** | ||
* service started lifecycle event handler | ||
*/ | ||
async started() { | ||
|
||
}, | ||
|
||
/** | ||
* service stopped lifecycle event handler | ||
*/ | ||
async stopped() { | ||
|
||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters