libCloudSync
v0.1.0
Access Cloud Storage from C++
|
A simple-to-use C++ interface to interact with cloud storage providers.
To use this library in you project, you can install it in the following ways:
If you don't want to build & run tests when building from source, set the CONAN_RUN_TESTS variable:
This library uses Catch2 for testing. The Unit-tests are defined in test
.
conan build -bf build --test .
.CloudSyncTest
targetTo ensure that the library behaves consistently with all cloud providers, the integration test runs a series of filesystem operations and checks for the correct results while being connected to the real cloud provider.
To execute the tests you need to provide valid credentials to an account for each of the supported providers.
A small CLI example implementation is provided, to show the capabilities of the library.
https://www.googleapis.com/auth/userinfo.profile
for loading the user profile.https://www.googleapis.com/auth/drive
if you want access to your whole gdrive space.https://www.googleapis.com/auth/drive.appdata
if you want access an the OAuth 2.0 Playground appfolder.CloudSyncExample
, provide which root you want to access. Must match the permissions you requested: CloudSyncExample
with the domain, username and the app-password: This project uses Doxygen for documentation.
To generate the docs, run doxygen Doxyfile
or execute the doxygen
target defined in the CMakeLists.txt
.
This template uses Github Actions for automating the release of a new library version.
configureBuildTestCreateAndUpload.yaml
configures, builds, tests the library automatically on each push. When a new release is created in Github, the resulting artifact is automatically uploaded to a public artifactory repositorypublish-pages.yaml
automatically builds and publishes the documentation to Github Pages when a new release is created in Github.The C++ code should follow a derivation of cppbestpractices code style:
MyClass
my_method
const double PI=3.14159265358979323;
m_
prefix to distinguish it from public data. m_
stands for "member" datausing namespace
in a header file{}
are required for blocks.""
for including local files, <>
is reserved for system includes.hpp
and .cpp
for your file extensionsexplicit
, which requires them to be explicitly called.Visit https://www.dropbox.com/developers/apps
and create a new app. In the tab Settings
under the section OAuth 2
there is a button to create an access token. It seems to be valid infinitely.
Create an app in the Azure Portal. Copy the client-Id from the 'General'-Section. Follow these instructions to obtain a token.
Go to https://developers.google.com/oauthplayground
, select the required scope, e.g. https://www.googleapis.com/auth/drive.appdata
and let the tool do its job.
Does not support OAuth2, requires Username/Password login.
In your Nextcloud installation go to settings
> user
> security
to create a specific app-password (recommended).