phore / objectstore
Object store for local files, google, aws
Installs: 4 474
Dependents: 7
Suggesters: 2
Security: 0
Stars: 2
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- ext-json: *
- ext-openssl: *
- ext-yaml: *
- phore/core: *
- phore/http-client: *
Requires (Dev)
- aws/aws-sdk-php: ^3.151
- google/cloud-storage: *
- microsoft/azure-storage-blob: *
- phore/filesystem: *
- phpunit/phpunit: 8.5.x-dev
Suggests
- google/cloud-storage: If using Google Cloud services
- microsoft/azure-storage-blob: Access Azure
- phore/filesystem: If using filesystem driver
This package is auto-updated.
Last update: 2024-11-25 11:46:14 UTC
README
Install
composer requre phore/objectstore
Basic usage
$store = new ObjectStore(\Phore\ObjectStore\ObjectStoreDriverFactory::Build("gcs://<bucket-name>?keyfile=/run/secrets/google-key-1"));
$store = new ObjectStore(new GoogleCloudStoreDriver(__DIR__ . "/file/to/identity.json", "bucketName")); $store->object("object/some.json")->put("Some Data"); if ($store->has("object/some.json")) echo "Object existing"; echo $store->object("object/some.json")->get();
Driver
The object store can be created with
$objectStore = ObjectStore::Connect('gcs://some-bucket?keyfile=/run/secrets/xyz');
Available Drivers: Configuration options
See the Configuration options page for full driver documentation
Develop
The google native drivers require a secret as service account. Create the secret using
./kickstart.sh secrets edit google_test