# README
Kivik CouchDB
CouchDB 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.
package main
import (
"context"
kivik "github.com/go-kivik/kivik/v4"
_ "github.com/go-kivik/kivik/v4/couchdb" // The CouchDB driver
)
func main() {
client, err := kivik.New(context.TODO(), "couch", "")
// ...
}
License
This software is released under the terms of the Apache 2.0 license. See LICENCE.md, or read the full license.
# Functions
BasicAuth provides support for HTTP Basic authentication.
CookieAuth provides CouchDB [Cookie auth].
JWTAuth provides support for CouchDB JWT-based authentication.
NewAttachment is a convenience function, which sets the size of the attachment based on content.
OptionFullCommit is the option key used to set the `X-Couch-Full-Commit` header in the request when set to true.
OptionHTTPClient may be passed as an option when creating a CouchDB client to specify an custom [net/http.Client] to be used when making all API calls.
OptionIfNoneMatch is an option key to set the `If-None-Match` header on the request.
OptionNoMultipartGet instructs [github.com/go-kivik/kivik/v4.DB.Get] not to use CouchDB's ability to download attachments with the multipart/related media type.
OptionNoMultipartPut instructs [github.com/go-kivik/kivik/v4.DB.Put] not to use CouchDB's multipart/related upload capabilities.
OptionNoRequestCompression instructs the CouchDB client not to use gzip compression for request bodies sent to the server.
OptionPartition instructs supporting methods to limit the query to the specified partition.
OptionUserAgent may be passed as an option when creating a client object, to append to the default User-Agent header sent on all requests.
ProxyAuth provides support for CouchDB's [proxy authentication].