Provides storage for osin
go get github.com/elgris/osin-couchbase-storage
Tests are not pure unit tests, they require running Couchbase instance. You can provide all necessary connection parameters via command line:
go test -couchbase="couchbase://localhost" -bucket="test" -password="111"
Example:
import (
"github.com/elgris/osin-couchbase-storage"
"github.com/RangelReale/osin"
)
s, err := storage.NewStorage(storage.Config{
ConnectionString: "couchbase://localhost",
BucketName: "default",
BucketPassword: "",
})
if err != nil {
panic(err.Error())
}
server := osin.NewServer(osin.NewServerConfig(), s)
MIT