Go SDK Bulk updates and Sync Gateway Bulk updates APi

If I do a bulk updates/insert operation with go sdk, will those documents reflect in couchlite databases ? Or do I have to do the bulk updates with Sync Gateway public api so they are replicated in couchlite ?

You can’t use the Couchbase Server SDKs on the bucket backing Sync Gateway otherwise it will interfere with the _sync metadata and documents won’t sync properly. But recently we’ve switched to using Swagger to document the Sync Gateway REST API and it generates libraries based on the API spec. This guide explains how to set up the JS wrapper but there’s one for Go as well https://github.com/go-swagger/go-swagger. You’ll have to generate the Go client based on the API spec. Let me know if it works for you.


1 Like