pouchdb

package
v4.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

README

Go Reference

Kivik PouchDB

PouchDB 9.x driver for Kivik.

Usage

This package provides an implementation of the github.com/go-kivik/kivik/v4/driver interface. You must import the driver and can then use the full Kivik API.

//go:build js

package main

import (
    "context"

    kivik "github.com/go-kivik/kivik/v4"
    _ "github.com/go-kivik/kivik/v4/pouchdb" // The PouchDB driver
)

func main() {
    client, err := kivik.New(context.TODO(), "pouch", "")
    // ...
}

This package is intended to run in a JavaScript runtime, such as a browser or Node.js, and must be compiled with GopherJS. At runtime, the PouchDB JavaScript library must also be loaded and available.

What license is Kivik released under?

This software is released under the terms of the Apache 2.0 license. See LICENCE.md, or read the full license.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL