Documentation Index
Fetch the complete documentation index at: https://docs.ditto.live/llms.txt
Use this file to discover all available pages before exploring further.
This content is for SDK V4. For the latest version, see the V5 documentation.
The Go SDK is currently in Public Preview with version
5.0.0-go-preview.3. If you encounter any issues or need assistance, please contact Ditto Support.The Ditto Go SDK is now available in Public Preview. This initial release provides core functionality for building peer-to-peer sync applications in Go, including authentication, data querying, real-time observers, and presence detection.
Authentication & Initialization
- Offline Initialization: Initialize Ditto instances without requiring network connectivity, enabling immediate local-first operations
- Authentication Support: Authenticate with Ditto Cloud using standard authentication flows
- Standard Initialization: Full initialization with network connectivity and cloud integration
Data Operations with DQL
- DQL Execute: Run Ditto Query Language (DQL) queries to perform data operations including SELECT, INSERT, UPDATE, UPSERT, and DELETE
- Live Queries (Observers): Register observers on queries to receive real-time updates when matching documents change
- Subscriptions: Create sync subscriptions to control which data syncs between peers
- Transactions: Execute multiple DQL operations atomically within transactions for data consistency
Peer-to-Peer Networking
- Presence: Detect and monitor connected peers in your mesh network with presence observers
- Differ: Track and sync document changes efficiently between peers
Developer Tools
- Logging: Configurable logging system to monitor SDK operations and debug sync behavior
- Small Peer Info: Access metadata about connected peers
- Ditto Properties: Inspect SDK configuration and runtime properties
- Serialization: Serialize and deserialize Ditto documents and data types