Build an implementation of the Cloud Sync Service (CSS) storage interface that works with CouchDB, and test it with unit tests.
As of writing this, MongoDB is the only production capable database that can be configured for Cloud Sync Service storage. Mongo recently changed their licensing terms, making it harder to consume the open-horizon platform into a commercial product. This project will extend the sync service to support CouchDB as an alternative.
The storage component of the sync-service has a Golang interface that is used by the core to persist object metadata and the objects themselves. The task is to provide an implementation of that interface that works with CouchDB.
Golang v1.14
CouchDB v3.1 (https://docs.couchdb.org/en/stable/)
Kivik v3 is used as the Golang library for CouchDB. Kivik is the only library that is actively maintained, has support for CouchDB 3, and has detailed documentation.
Required imports:
"github.com/go-kivik/couchdb/v3" // The CouchDB Driver
"github.com/go-kivik/couchdb/v3/chttp" // For authentication functions
kivik "github.com/go-kivik/kivik/v3"
Documentation links:
A CSS object consists of metadata, binary data, and some other properties. This section documents how CSS concepts relate to CouchDB concepts.