Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 2.0% on proxy.golang.org
Top 1.1% dependent packages on proxy.golang.org
Top 1.0% dependent repos on proxy.golang.org
Top 3.7% forks on proxy.golang.org
Top 1.0% docker downloads on proxy.golang.org

proxy.golang.org : github.com/go-kivik/kivik/v4

Package kivik provides a generic interface to CouchDB or CouchDB-like databases. The kivik package must be used in conjunction with a database driver. The officially supported drivers are: The Filesystem and Memory drivers are also available, but in early stages of development, and so many features do not yet work: The kivik driver system is modeled after the standard library's `sql` and `sql/driver` packages, although the client API is completely different due to the different database models implemented by SQL and NoSQL databases such as CouchDB. The most methods, including those on Client and DB are safe to call concurrently, unless otherwise noted. CouchDB stores JSON, so Kivik translates Go data structures to and from JSON as necessary. The conversion from Go data types to JSON, and vice versa, is handled automatically according to the rules and behavior described in the documentation for the standard library's encoding/json package. Most client and database methods take optional arguments of the type Option. Multiple options may be passed, and latter options take precidence over earlier ones, in case of a conflict. Params and Param can be used to set options that are generally converted to URL query parameters. Different backend drivers may also provide their own unique options with driver-specific effects. Consult your driver's documentation for specifics. Kivik returns errors that embed an HTTP status code. In most cases, this is the HTTP status code returned by the server. The embedded HTTP status code may be accessed easily using the HTTPStatus() method, or with a type assertion to `interface { HTTPStatus() int }`. Example: Any error that does not conform to this interface will be assumed to represent a http.StatusInternalServerError status code. For common usage, authentication should be as simple as including the authentication credentials in the connection DSN. For example: This will connect to `localhost` on port 5984, using the username `admin` and the password `abc123`. When connecting to CouchDB (as in the above example), this will use cookie auth. Depending on which driver you use, there may be other ways to authenticate, as well. At the moment, the CouchDB driver is the only official driver which offers additional authentication methods. Please refer to the CouchDB package documentation for details. With a client handle in hand, you can create a database handle with the DB() method to interact with a specific database.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/go-kivik/kivik/v4
Keywords: couchdb, database, go, gopherjs-bindings, nosql, pouchdb
License: Apache-2.0
Latest release: about 2 months ago
First release: 9 months ago
Namespace: github.com/go-kivik/kivik
Dependent packages: 20
Dependent repositories: 29
Stars: 281 on GitHub
Forks: 40 on GitHub
Docker dependents: 2
Docker downloads: 28,420
See more repository details: repos.ecosyste.ms
Last synced: 15 days ago

    Loading...
    Readme
    Loading...