modulepackage
0.0.0-20160817113035-5f9d2a1a29e5
Repository: https://github.com/timjacobi/go-couchdb.git
Documentation: pkg.go.dev
# README
What's this?
go-couchdb is yet another CouchDB client written in Go. It was written because all the other ones didn't provide functionality that I need.
The API is not fully baked at this time and may change.
This project contains three Go packages:
package couchdb 
import "github.com/timjacobi/go-couchdb"
This wraps the CouchDB HTTP API.
package couchapp 
import "github.com/timjacobi/go-couchdb/couchapp"
This provides functionality similar to the original couchapp tool, namely compiling a filesystem directory into a JSON object and storing the object as a CouchDB design document.
package couchdaemon 
import "github.com/timjacobi/go-couchdb/couchdaemon"
This package contains some functions that help you write Go programs that run as a daemon started by CouchDB, e.g. fetching values from the CouchDB config.
Tests
You can run the unit tests with go test
.
# Packages
Package couchapp implements a mapping from files to CouchDB documents.
Package couchdaemon provides utilities for processes running as a CouchDB os_daemon.
# Functions
BasicAuth returns an Auth that performs HTTP Basic Authentication.
Conflict checks whether the given error is a DatabaseError with StatusCode == 409.
ErrorStatus checks whether the given error is a DatabaseError with a matching statusCode.
NewClient creates a new client object.
NotFound checks whether the given errors is a DatabaseError with StatusCode == 404.
ProxyAuth returns an Auth that performs CouchDB proxy authentication.
Unauthorized checks whether the given error is a DatabaseError with StatusCode == 401.
# Structs
Attachment represents document attachments.
ChangesFeed is an iterator for the _changes feed of a database.
Client represents a remote CouchDB server.
DB represents a remote CouchDB database.
DBUpdatesFeed is an iterator for the _db_updates feed.
Error represents API-level errors, reported by CouchDB as {"error": <ErrorCode>, "reason": <Reason>}.
Members represents member lists in database security objects.
Security represents database security objects.
# Interfaces
Auth is implemented by HTTP authentication mechanisms.
# Type aliases
Options represents CouchDB query string parameters.