lib/kms/utilities.js
/**
 * This function is used as a binary to send a request to S3 and create an
 * encrypted bucket, because most of the s3 tools don't support custom
 * headers
 *
 * @return {undefined}
 */
This function is used as a binary to send a request to S3 and create an
encrypted bucket, because most of the s3 tools don't support custom
headers

@return {undefined}
This function is used as a binary to send a request to S3 and create an encrypted bucket because most of the s3 tools don ' t support custom headers @return { undefined }
function createEncryptedBucket() {
    commander
        .version('0.0.1')
        .option('-a, --access-key <accessKey>', 'Access key id')
        .option('-k, --secret-key <secretKey>', 'Secret access key')
        .option('-b, --bucket <bucket>', 'Name of the bucket')
        .option('-h, --host <host>', 'Host of the server')
        .option('-p, --port <port>', 'Port of the server')
        .option('-s', '--ssl', 'Enable ssl')
        .option('-v, --verbose')
        .parse(process.argv);
    const { host, port, accessKey, secretKey, bucket, verbose, ssl } =
        commander;
    if (!host || !port || !accessKey || !secretKey || !bucket) {
        logger.error('missing parameter');
        commander.outputHelp();
        process.exit(1);
    }
    _createEncryptedBucket(host, port, bucket, accessKey, secretKey, verbose,
        ssl);
}
function createEncryptedBucket ( ) { commander . version ( '0.0.1' ) . option ( '-a, --access-key <accessKey>' , 'Access key id' ) . option ( '-k, --secret-key <secretKey>' , 'Secret access key' ) . option ( '-b, --bucket <bucket>' , 'Name of the bucket' ) . option ( '-h, --host <host>' , 'Host of the server' ) . option ( '-p, --port <port>' , 'Port of the server' ) . option ( '-s' , '--ssl' , 'Enable ssl' ) . option ( '-v, --verbose' ) . parse ( process . argv ) ; const { host , port , accessKey , secretKey , bucket , verbose , ssl } = commander ; if ( ! host || ! port || ! accessKey || ! secretKey || ! bucket ) { logger . error ( 'missing parameter' ) ; commander . outputHelp ( ) ; process . exit ( 1 ) ; } _createEncryptedBucket ( host , port , bucket , accessKey , secretKey , verbose , ssl ) ; }
This function is used as a binary to send a request to S3 and create an
 encrypted bucket, because most of the s3 tools don't support custom
 headers
This function is used as a binary to send a request to S3 and create an encrypted bucket because most of the s3 tools don ' t support custom headers