Documentation
¶
Overview ¶
Package pouchdb provides a PouchDB driver for Kivik. It must be compiled with GopherJS, and requires that the PouchDB JavaScript library is also loaded at runtime.
General Usage ¶
Use the `pouch` driver name when using this driver. The DSN should be the blank string for local database connections, or a full URL, including any required credentials, when connecting to a remote database.
//go:build js
package main
import (
"context"
kivik "github.com/go-kivik/kivik/v4"
_ "github.com/go-kivik/kivik/v4/pouchdb" // PouchDB driver
)
func main() {
client, err := kivik.New(context.TODO(), "pouch", "")
// ...
}
Options ¶
The PouchDB driver generally interprets github.com/go-kivik/kivik/v4.Params keys and values as key/value pairs to pass to the relevant PouchDB method. In general, PouchDB's key/value pairs are the same as the query parameters used for CouchDB. Consult the PouchDB API documentation for the relevant methods for any exceptions or special cases.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bindings provides minimal GopherJS bindings around the PouchDB library.
|
Package bindings provides minimal GopherJS bindings around the PouchDB library. |
|
poucherr
Package poucherr exists only for the purpose of testing the PouchDB binding's handling of PouchDB-specific error messages.
|
Package poucherr exists only for the purpose of testing the PouchDB binding's handling of PouchDB-specific error messages. |
|
Package test provides PouchDB integration tests.
|
Package test provides PouchDB integration tests. |