-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworked storage configuration section - added storage URI (#43)
Changed the way how storage backend is configured: instead of 'type' and 'path' parameters we now have single 'uri', which incorporates both and is open for future extensions Currently, two schemas are supported: * 'file://<path>' for local filesystem; * 's3://<access_key_id>:<secret_access_key>@<bucket_name>/<path>' for AWS S3. Please note that for 's3' credentials can be omitted, in other words 's3://<bucket_name>/<path>' is also a valid URI provided that this <bucket_name> bucket is publicly accessible. 's3_storage_backend' class (still a stub) extended with missing AWS S3 configuration parameters: * 'access_key_id'; * 'secret_access_key'; * 'bucket'. Reworked constructors of both 's3_storage_backend' and 'filesystem_storage_backend': they now accept single 'boost::urls::url_view_base' parameter. These constructors extended with basic URI validation (for schema, userinfo, host, port, path, query, and fragment). 'do_get_description()' method of both 's3_storage_backend' and 'filesystem_storage_backend' extended with including more configuration parameters: * 'path' for local filesystem; * 'bucket' and 'path' for AWS S3 (credentials are omitted deliberately). Reworked 'storage_backend_factory::create()' method: it now determines which concrete implementation of the 'basic_storage_backend' interface it should construct based on the schema part of the 'uri' parameter from the 'storage' configuration section. Update "help" message for the main application to reflect new 'storage.uri' parameter. Updated sample configuration JSON file.
- Loading branch information
1 parent
0c53c6e
commit 1d19abd
Showing
11 changed files
with
151 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
"password": "" | ||
}, | ||
"storage": { | ||
"type": "fs", | ||
"path": "./storage" | ||
"uri": "file:///home/user/vault" | ||
} | ||
} |
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
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