phore/objectstore

Object store for local files, google, aws

v1.0.5 2024-01-30 10:54 UTC

This package is auto-updated.

Last update: 2024-10-25 11:38:34 UTC


README

tests

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