A newer version of this documentation is available.

View Latest

SDK Installation

Installing the Couchbase Go SDK is similar to installing most other Go projects:

$ go get gopkg.in/couchbase/gocb.v1

API Documentation

The most current and up to date API Documentation is always available through the godoc website.

Any checkouts of the Go SDK between July 10 2017 and Sept 29 2017 may have compatibility issues with Server 5.0.

Version 1.6.1 (16 April 2019)

Version 1.6.1 is a maintenance for the 1.6.x series.

Fixed Issues

  • GOCBC-421: Fixed issue where the threshold logging tracer would log “Threshold Log:” messages at INFO level even when there were no threshold logs to report.

  • GOCBC-413: Fixed issue where the SDK can get into a state where all future requests timeout following certain circumstances where a request times out whilst it is being sent.

  • GOCBC-431: Fixed issue where the SDK would fail to connect to some external network types such as a publicly addressable Kubernetes cluster.

Version 1.6.0 (19 March 2019)

Version 1.6.0 is the first release for the 1.6.x series.

Fixed Issues

  • GOCBC-401: Fixed issue where search results containing non-string hit results could not be unmarshaled. This change deprecates the Fields property of SearchResultHit and adds a new AllFields property.

Version 1.5.2 (18 December 2018)

Version 1.5.2 is a maintenance release for the 1.5.x series.

Fixed Issues

  • GOCBC-380: Fixed issue where the SDK was ignoring the network type set by the user.

Version 1.5.1 (21 November 2018)

Version 1.5.1 is a maintenance release for the 1.5.x series.

New Features and Behavioral Changes

Fixed Issues

  • GOCBC-363: Fixed issue where the Stats call could hang when in a multi-node cluster a single node does not respond in a timely manner.

Version 1.5.0 (16 October 2018)

Version 1.5.0 is the first release of our 1.5.x series.

New Features and Behavioral Changes

  • Analytics features now marked as committed.

  • GOCBC-351: Add the document key to tracing spans when log redaction set to none.

Fixed Issues

  • GOCBC-353: Fixed issue where raw IPv6 addresses were parsed incorrectly.

  • GOCBC-359: Fixed issue where MatchAll and MatchNone search queries did not work correctly.

Version 1.4.2 (19 September 2018)

Version 1.4.2 is a maintenance release for the 1.4.x series.

New Features and Behavioral Changes

  • GOCBC-343, GOCBC-342, GOCBC-349: Updated Analytics support to include latest changes for GA. Including retrying on certain http error codes, parametrized queries and extra query options.

  • GOCBC-347: Added support for retrying FTS queries on status code 429.

Fixed Issues

  • GOCBC-350: Fixed issue so that requests for managing views only use basic authentication when a username or password are provided.

  • GOCBC-345: Fixed issue where nodes in cluster config nodesExt list but not nodes list would be considered available for use.

Version 1.4.1 (21 August 2018)

Version 1.4.1 is a maintenance release for the 1.4.x series.

Fixed Issues

  • GOCBC-339: Fixed issue with leaking goroutines occuring intermittently in tests.

  • GOCBC-341: Fixed issue where FTS ExecuteSearchQuery would return a JSON unmarshal error on invalid queries.

Version 1.4.0 (18 July 2018)

Version 1.4.0 is the first release of our 1.4.x series.

New Features and Behavioral Changes

  • GOCBC-313: Added alternate name/alternate port config support.

  • GOCBC-305: Added orphaned response logging.

Fixed Issues

  • GOCBC-309: Updated ThresoldLoggingTracer configuration to match RFC.

  • GOCBC-317: Fixed issue with Touch causing Invalid Parameters Error.

  • GOCBC-323: Fixed issue where some log messages log the local address instead of remote address.

  • GOCBC-325: Fixed issue where search Query sorting order should be "desc"

  • GOCBC-327: Fixed issue causing data race on zombie logger.

  • GOCBC-328: Fixed issue causing data race on memdopmap drain/add.

  • GOCBC-329: Fixed issue where pipeline clients are sometimes created with no parent

  • GOCBC-290: Fixed issue causing panic in pipeline client during consumer close.

  • GOCBC-331: Fixed issue where SDK leaves goroutines running after closing.

  • GOCBC-335: Fixed issue where SDK logs warnings when HTTP config poller intentionally disconnects.

Version 1.3.6 (15 May 2018)

Version 1.3.6 is a maintenance release for the 1.3.x series.

New Features and Behavioral Changes

  • GOCBC-277: Added FTS index management.

  • GOCBC-288: Added support for durability to sub-document operations.

Fixed Issues

  • GOCBC-159: Fixed issue causing a connection leak to happen when running N1QL queries concurrently.

  • GOCBC-290: Fixed issue where authentication credential provider errors are ignored.

  • GOCBC-292: Fixed issue where protocol errors cause panics.

  • GOCBC-294: Fixed issue where status code is not correctly parsed from altresponses.

Version 1.3.5 (6 April 2018)

Version 1.3.5 is an unscheduled release for the 1.3.x series to fix a critical issue which was discovered.

Fixed Issues

  • GOCBC-289: Corrected issue with Replace not respecting passed CAS values.

Version 1.3.4 (23 March 2018)

Version 1.3.4 is a maintenance release for the 1.3.x series.

New Features and Behavioral Changes

  • GOCBC-264: Added initial OpenTracing tracer support.

  • GOCBC-267: Implemented support for network compression.

  • GOCBC-265: Added built-in threshold logging tracer.

  • GOCBC-278: Added support for N1QL profiling mode option.

  • GOCBC-276: Added documentation for support connection string options.

Fixed Issues

  • GOCBC-280: Fixed issue causing sub-document ops to sometimes panic.

  • GOCBC-274: Fixed issue with bad support for analytics host:port pairs.

  • GOCBC-273: Fixed issue with credentials not being sent to analytics service.

  • Fixed issue with SetRemove corrupting the list.

  • Added support for DCP flags.

  • Various minor fixes.

Version 1.3.3 (16 January 2018)

Version 1.3.3 is a maintenance release for the 1.3.x series.

Note that release 1.3.2 was skipped due to an internal versioning change.

New Features and Behavioral Changes

  • GOCBC-245: Added initial support for Ping and HealthCheck.

  • GOCBC-248: Include gocb versions in gocbcore server HELLO.

  • GOCBC-258: Added support for client certificate authentication.

Fixed Issues

  • GOCBC-263: Fixed issue with SetRemove corrupting the set.

Version 1.3.1 (29 December 2017)

Version 1.3.1 is a maintenance release for the 1.3.x series.

New Features and Behavioral Changes

  • GOCBC-245: Added initial APIs for Health Check.

  • GOCBC-256: Exposed dynamic authentication system.

  • GOCBC-255: Added initial APIs for generic HTTP requests.

Fixed Issues

  • GOCBC-262: Correct issue with IPv6 config parsing.

  • Various minor bug fixes.

Version 1.3.0 (21 September 2017)

Version 1.3.0 is the first release of our 1.3.x series.

New Features and Behavioral Changes

  • GOCBC-234: Marked all Server 5.0 APIs as stable.

  • GOCBC-176: Made fast-failover enabled by default.

  • GOCBC-227: Mapped Server 5.0 LOCKED errors for backwards compatibility.

  • GOCBC-233: Ensure dead connections timeout in a reasonable time.

Fixed Issues

  • Various minor bug fixes.

Version 1.2.5 (24 August 2017)

New Features and Behavioral Changes

  • GOCBC-226: Added additional N1QL query parameters for 5.0.

  • GOCBC-193: Expose enhanced error messages in bucket API.

Fixed Issues

  • GOCBC-224: Return partial view errors during Close call.

  • Various minor bug fixes

Version 1.2.4 (18 July 2017)

New Features and Behavioral Changes

  • GOCBC-208: Implemented new RBAC user management features.

  • GOCBC-162: Added support for server-side error descriptions.

  • GOCBC-215: Implemented support for errors with context.

  • GOCBC-216: Added support for HTTP2.0 on TLS HTTP connections.

  • GOCBC-209: Added new error codes from Server 5.0.0.

  • GOCBC-203: Improved KeyExists error to be more descriptive.

Fixed Issues

  • GOCBC-221: Fix issue with blank management credentials not working.

  • GOCBC-220: Fixed bug causing tests to sporadically fail.

  • GOCBC-205: Fixed bug causing memdClient goroutines to leak.

  • GOCBC-219: Fixed bug causing Stats command to sometimes fail.

  • GOCBC-214: Improved testing speed by using time-travel.

  • GOCBC-217: Fixed issue with FTS over HTTPS.

  • Fixed issue with GetDesignDocuments returning incorrect items.

  • Fixed issue causing DCP nop’s to fail under load.

  • Various minor bug fixes

Version 1.2.3 (24 May 2017)

New Features and Behavioral Changes

  • GOCBC-189: Implemented document-level sub-document flags.

  • GOCBC-188: Implemented support for fast-failover.

  • GOCBC-196: Implemented DCP No-Op.

  • GOCBC-138: Implemented DCP Flow Control.

  • GOCBC-197: Added method to fetch bucket UUID.

  • GOCBC-199: Added new sub-document error codes.

  • GOCBC-140: Added support for Ephemeral Buckets.

  • GOCBC-191: Updated to latest RBAC management spec.

  • GOCBC-184: Implemented FTS sorting and geo querying.

  • GOCBC-198: Renamed RbacAuthenticator to PasswordAuthenticator.

  • GOCBC-201: Implemented sub-document GET_COUNT operation.

Fixed Issues

  • Fixed issue where InsertBucket could return nil when errors occured.

  • Fixed bug with Stats call never returning in some instances.

  • Correctly handle access errors during authentication on Server 5.0.0.

  • Fixed issue where missing buckets caused OpenBucket to hang.

  • Various minor bug fixes

Version 1.2.2 (18 April 2017)

New Features and Behavioral Changes

  • GOCBC-135: Implement experimental support for Analytics service.

  • GOCBC-183: Added support for fetching raw data from sub-document operations.

  • GOCBC-182: Added more connection string configurable options.

  • GOCBC-181: Added support for full-document sub-document operations.

Fixed Issues

  • Various Minor Refactors

  • Various Minor Bug Fixes

Version 1.2.1 (28 March 2017)

New Features and Behavioral Changes

  • Project has been refactored to support connection pooling.

  • Added experimental support for Extended Attributes.

  • Added experimental support for Role-Based User Management.

  • Added experimental support for Role-Based Authentication.

  • Improved logging integration between gocb and gocbcore.

Fixed Issues

  • GOCBC-155: Fixed race condition in Stats operation.

  • GOCBC-154: Exposed SASL auth methods from gocbcore.

  • GOCBC-153: Corrected missing message for invalid arguments error.

  • GOCBC-151: Improved handling of configuration revisions.

  • GOCBC-149: Fixed issue with Sub-Document store flags being ignored.

  • GOCBC-137: Avoid crash in DCP handling.

  • GOCBC-143: Attempt to recover from most internal errors.

  • GOCBC-147: Fixed incorrect feature codes being sent to server.

  • GOCBC-151: Implemented additional linting and static code validation.

  • Various Minor Bug Fixes

Version 1.2.0 (21 December 2016)

New Features and Behavioral Changes

  • All server 4.6 feature APIs have been moved from uncommitted to committed.

  • Added support for missing data-structure queue operations.

Fixed Issues

None.

Version 1.1.3 (14 December 2016)

New Features and Behavioral Changes

  • Project has been restructured so dependant packages are contained in their own repository, this is to correct the issue below.

Fixed Issues

  • GOCBC-134: Fixed issue causing go get installation to fail.

Version 1.1.2 (14 November 2016)

New Features and Behavioral Changes

  • GOCBC-127: Implement configurable bulk operation timeouts.

Fixed Issues

  • Fixed minor issue with sub-document array operations.

Version 1.1.1 (20 September 2016)

New Features and Behavioral Changes {#new-features-and-behavioral-changes-14 style="text-align:left"}

  • GOCBC-88: Implement Data Structures as per current RFC. …​

  • GOCBC-121: Implement latest changes to FTS RFC. …​

Fixed Issues

  • GOCBC-124: Properly close connections after shutdown. …​

Version 1.1.0 (21 June 2016)

Version 1.1.0 is the first general availability release of the 1.1 series. It adds new features for N1QL query and supports the developer preview full text search available in Couchbase Server 4.5. A number of these features were added as uncomitted API in the 1.0 series and are now promoted to committed API.

New Features and Behavioral Changes

  • GOCBC-56: Added support for Full Text Search service in Couchbase 4.5.

  • GOCBC-109: Added support for X.509 Certificates.

  • GOCBC-95: Extend BucketManager to support Index Management.

  • GOCBC-90: Add cluster level authenticator interface.

  • GOCBC-89: Improve vbucket retry logic for increased reliability with large deployments.

  • GOCBC-59: Include support for AT_PLUS N1QL Queries with Mutation Tokens.

  • GOCBC-58: Added support for Cross Bucket Joins.

Fixed Issues

None.