-
-
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.
Merge pull request #21 from datapartyjs/snapshot
Service Host
- Loading branch information
Showing
17 changed files
with
493 additions
and
14 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
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
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
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
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
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,42 @@ | ||
const Joi = require('@hapi/joi') | ||
const Hoek = require('@hapi/hoek') | ||
const {Message, Routines} = require('@dataparty/crypto') | ||
const debug = require('debug')('dataparty.endpoint.version') | ||
|
||
const IEndpoint = require('../iendpoint') | ||
|
||
module.exports = class ServiceVersion extends IEndpoint { | ||
|
||
static get Name(){ | ||
return 'version' | ||
} | ||
|
||
|
||
static get Description(){ | ||
return 'Get service version' | ||
} | ||
|
||
static get MiddlewareConfig(){ | ||
return { | ||
pre: { | ||
decrypt: false, | ||
validate: Joi.object().keys({}).description('no input allowed'), | ||
}, | ||
post:{ | ||
validate: Joi.object().keys({ | ||
name: Joi.string(), | ||
branch: Joi.string(), | ||
version: Joi.string(), | ||
githash: Joi.string() | ||
}) | ||
} | ||
} | ||
} | ||
|
||
static async run(ctx, static_ctx){ | ||
|
||
return { | ||
...Package | ||
} | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.