gl-store-s3.js/index.js

30 lines
709 B
JavaScript
Raw Normal View History

2019-05-08 23:01:23 +00:00
var path = require("path");
var Promise = require("bluebird");
2019-05-08 13:05:05 +00:00
const defaultOptions = {
accessKeyId: null
, secretAccessKey: null
, bucketName: null
, bucketRegion: null
2019-05-08 23:01:23 +00:00
, accountsDir: "accounts/"
, configDir: "acme/"
2019-05-08 23:12:15 +00:00
};
2019-05-08 13:05:05 +00:00
2019-05-08 23:01:23 +00:00
const pathHelper = require("./lib/pathHelper");
const fileNames = require("./lib/fileNames");
2019-05-08 14:37:55 +00:00
2019-05-08 13:05:05 +00:00
module.exports.create = (createOptions) => {
const options = Object.assign({}, defaultOptions, createOptions);
2019-05-09 20:20:14 +00:00
require('./lib/debug')(options.debug);
require('./lib/aws')(options);
2019-05-08 13:05:05 +00:00
const handlers = {
2019-05-09 20:20:14 +00:00
certificates: require("./lib/certificates")(options)
, accounts: require("./lib/accounts")(options)
2019-05-09 07:36:47 +00:00
};
2019-05-08 13:05:05 +00:00
return handlers;
2019-05-08 23:12:15 +00:00
};