Client is the main struct exposed by the CyborgDB Go SDK. It provides a high-level interface to interact with the CyborgDB vector database service, allowing you to create and manage encrypted indexes.
Constructor
Client instance for connecting to a CyborgDB microservice.
Parameters
| Parameter | Type | Description |
|---|---|---|
baseURL | string | Base URL of the CyborgDB microservice endpoint |
apiKey | string | API key for authentication with the microservice |
verifySSL | ...bool | (Optional) SSL verification setting. If omitted, auto-detects based on URL |
Example Usage
Error Handling
TheClient struct includes comprehensive error handling that processes different types of API errors:
- HTTP Errors: Status codes and response details are logged and converted to meaningful error messages
- Validation Errors: Field validation failures are formatted with detailed information
- Network Errors: Connection and timeout issues are handled gracefully