couchdb

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

README

Build Status https://img.shields.io/codecov/c/github/go-kivik/couchdb.svg?style=flat)](https://codecov.io/gh/go-kivik/couchdb) GoDoc

Kivik CouchDB

CouchDB driver for Kivik.

Usage

This package provides an implementation of the github.com/flimzy/kivik/driver interface. You must import the driver and can then use the full Kivik API. Please consult the Kivik wiki for complete documentation and coding examples.

package main

import (
    "context"

    "github.com/flimzy/kivik"
    _ "github.com/go-kivik/couchdb" // The PouchDB driver
)

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

License

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

Documentation

Overview

Package couchdb is a driver for connecting with a CouchDB server over HTTP.

Index

Constants

View Source
const (
	CompatUnknown = iota
	CompatCouch16
	CompatCouch20
)

Compatibility modes

View Source
const (
	VendorCouchDB  = "The Apache Software Foundation"
	VendorCloudant = "IBM Cloudant"
)

Known vendor strings

Variables

This section is empty.

Functions

This section is empty.

Types

type CompatMode

type CompatMode int

CompatMode is a flag indicating the compatibility mode of the driver.

type Couch

type Couch struct{}

Couch represents the parent driver instance.

func (*Couch) NewClient

func (d *Couch) NewClient(ctx context.Context, dsn string) (driver.Client, error)

NewClient establishes a new connection to a CouchDB server instance. If auth credentials are included in the URL, they are used to authenticate using CookieAuth (or BasicAuth if compiled with GopherJS). If you wish to use a different auth mechanism, do not specify credentials here, and instead call Authenticate() later.

Directories

Path Synopsis
Package chttp provides a minimal HTTP driver backend for communicating with CouchDB servers.
Package chttp provides a minimal HTTP driver backend for communicating with CouchDB servers.

Jump to

Keyboard shortcuts

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