ganesha-plugin/couchbase-adapter

Couchbase adapter for ackintosh/ganesha

1.0.1 2018-05-10 21:17 UTC

This package is auto-updated.

Last update: 2024-11-13 02:57:34 UTC


README

Build Status codecov Scrutinizer Code Quality Latest Stable Version

This package provides Couchbase adapter for ackintosh/ganesha.

Installation

$ composer require ganesha-plugin/couchbase-adapter

How to use

With ackintosh/ganesha:

// create bucket instance
$cluster = new \Couchbase\Cluster('...');
$authenticator = new \Couchbase\PasswordAuthenticator();
$authenticator->username('...')->password('...');
$cluster->authenticate($authenticator);
$bucket = $cluster->openBucket('...');

$ganesha = \Ackintosh\Ganesha\Builder::build([
    ..., // other options
    'adapter' => new \GaneshaPlugin\Adapter\Couchbase($bucket),
]);

Development

to run unit test:

$ make start                                  # start couchbase server in docker container
$ TEST_COUCHBASE_HOST=localhost composer test # run unit test

License

MIT License