couchdb

package module
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT-0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

bs-couchdb

Library for communicating with CouchDB

Notes

  • Experimental JSON dependency: This library uses encoding/json/v2, which is still marked experimental upstream. It is a deliberate choice for this personal library (not published to pkg.go.dev); expect the possibility of API changes in the underlying package.
  • Plain HTTP is supported on purpose: http:// URLs are accepted without warning, since this library can be used in combined app + database Docker setups where TLS is not needed.
  • Logging may expose secrets: When logging is enabled, full request bodies are written through your LogWrite function. Bodies can contain sensitive data (for example, the /_session login request carries the password in cleartext). Use logging with caution in production.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CouchDBClient

type CouchDBClient struct {
	Databases databases.CouchDBDatabases
	Documents documents.CouchDBDocuments
	Server    server.CouchDBServer
}

func NewClient

func NewClient(url string, user string, password string, db string, authMode shared.AuthMode, enableLogging bool, logWrite func(string)) (CouchDBClient, error)

NewClient creates and returns a new instance of the CouchDBClient

type DocumentBase added in v1.3.4

type DocumentBase struct {
	Id               string         `json:"_id,omitempty"`
	Rev              string         `json:"_rev,omitempty"`
	Deleted          bool           `json:"_deleted,omitempty"`
	Attachments      map[string]any `json:"_attachments,omitempty"`
	Conflicts        []string       `json:"_conflicts,omitempty"`
	DeletedConflicts []string       `json:"_deleted_conflicts,omitempty"`
	LocalSeq         string         `json:"_local_seq,omitempty"`
	RevsInfo         []any          `json:"_revs_info,omitempty"`
	Revisions        map[string]any `json:"_revisions,omitempty"`
}

DocumentBase represents a base document structure in CouchDB. This exists for the user of the library to extend and use as a base for their own document structures.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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