https://github.com/spacemojo/couchcandy
CouchDB client library for GO
https://github.com/spacemojo/couchcandy
couchdb go json nosql
Last synced: 5 months ago
JSON representation
CouchDB client library for GO
- Host: GitHub
- URL: https://github.com/spacemojo/couchcandy
- Owner: spacemojo
- License: mit
- Created: 2017-03-14T22:28:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-05-01T16:55:22.000Z (about 1 year ago)
- Last Synced: 2025-05-01T17:50:53.794Z (about 1 year ago)
- Topics: couchdb, go, json, nosql
- Language: Go
- Homepage:
- Size: 94.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**couchcandy**
*Go client for Apache CouchDB*
[](https://opensource.org/licenses/MIT)
[](https://goreportcard.com/report/github.com/spacemojo/couchcandy)
[](https://godoc.org/github.com/spacemojo/couchcandy)
To get started :
```
client := couchcandy.NewCouchCandy(Session{
Host: "http://[HOST_IP]",
Port: [PORT],
Database: "database",
Username: "username",
Password: "p@$$w0rD",
})
```
From there you can simply call the methods available in the couchcandy client.
```
info, err := client.GetDatabaseInfo()
```
The returned info object is structured as such :
```
type DatabaseInfo struct {
DBName string `json:"db_name"`
DocCount int `json:"doc_count"`
DocDelCount int `json:"doc_del_count"`
UpdateSeq int `json:"update_seq"`
PurgeSeq int `json:"purge_seq"`
CompactRunning bool `json:"compact_running"`
DiskSize int `json:"disk_size"`
DataSize int `json:"data_size"`
InstanceStartTime string `json:"instance_start_time"`
DiskFormatVersion int `json:"disk_format_version"`
CommittedUpdateSeq int `json:"committed_update_seq"`
}
```