src/main.es6
/**
	 * Create a new configuration file.
	 *      This will validate the given definition against the given JSON schema and if valid,
	 *      upload to given S3 Bucket.
	 * @param {Object} args Arguments.
	 * @param {string} args.serviceName Name of service to get config for.
	 * @param {string} args.bucketName Name of bucket where the configs are.
	 * @param {Object} args.config Configuration definition to create.
	 * @param {Object} args.schema JSON schema to validate against.
	 * @returns {Promise}
	 */
Create a new configuration file.
This will validate the given definition against the given JSON schema and if valid,
upload to given S3 Bucket.
@param {Object} args Arguments.
@param {string} args.serviceName Name of service to get config for.
@param {string} args.bucketName Name of bucket where the configs are.
@param {Object} args.config Configuration definition to create.
@param {Object} args.schema JSON schema to validate against.
@returns {Promise}
Create a new configuration file . This will validate the given definition against the given JSON schema and if valid upload to given S3 Bucket . @param { Object } args Arguments . @param { string } args . serviceName Name of service to get config for . @param { string } args . bucketName Name of bucket where the configs are . @param { Object } args . config Configuration definition to create . @param { Object } args . schema JSON schema to validate against . @returns { Promise }
static createConfig(args) {
		console.info(`Will create service config for ${args.serviceName} ..`);
		return new Promise((resolve, reject) => {
			const configIsValid = Main._validateConfigFile(args.config, args.schema);
			if (!configIsValid) {
				reject("CONFIG_INVALID");
			} else {
				resolve(configIsValid);
			}
		});
	}
static createConfig ( args ) { console . info ( ` ${ args . serviceName } ` ) ; return new Promise ( ( resolve , reject ) => { const configIsValid = Main . _validateConfigFile ( args . config , args . schema ) ; if ( ! configIsValid ) { reject ( "CONFIG_INVALID" ) ; } else { resolve ( configIsValid ) ; } } ) ; }
Create a new configuration file.
Create a new configuration file .
// Upload to bucket here.