transactions-go

Installation
SKILL.md

Couchbase Transactions — Go

ACID multi-document transactions. All operations commit atomically or roll back entirely.

Version requirement: Distributed transactions require Couchbase Server 7.0+. The 6.6 developer preview is not recommended for production.

Bank Transfer Example

_, err := cluster.Transactions().Run(func(ctx *gocb.TransactionAttemptContext) error {
    sender, err := ctx.Get(collection, "acct_alice")
    if err != nil { return err }

    receiver, err := ctx.Get(collection, "acct_bob")
    if err != nil { return err }

    var senderDoc, receiverDoc map[string]interface{}
    sender.Content(&senderDoc)
    receiver.Content(&receiverDoc)
Installs
2
First Seen
Jun 18, 2026
transactions-go — couchbaselabs/agent-skills