Aevum Zenth Go SDK
Official Go client library for the Aevum Zenth Developer Platform. Interact with all 400+ divisions, unified API gateway, and enterprise-grade tooling.
Installation
The SDK is published as a standard Go module. Requires Go 1.21 or later.
go get github.com/aevum-zenth/go-sdk/v2
📦 Module Path
Always use v2 in your import paths. The SDK follows semantic versioning with breaking changes clearly documented.
Quickstart
Initialize the client and make your first request across any division.
package main
import (
"context"
"fmt"
"log"
"github.com/aevum-zenth/go-sdk/v2"
)
func main() {
// Initialize with API key from environment
client := aevum.NewClient(
aevum.WithAPIKey(os.Getenv("AEVUM_API_KEY")),
aevum.WithEnvironment(aevum.EnvProduction),
)
ctx := context.Background()
// Fetch live grid metrics from Energy Division
metrics, err := client.Energy.GetGridStatus(ctx, "EMEA-WEST")
if err != nil {
log.Fatalf("Failed to fetch grid status: %v", err)
}
fmt.Printf("Grid Load: %.2f%% | Renewables: %.2f%%\n",
metrics.CurrentLoad, metrics.RenewableMix)
}
Authentication
The SDK supports multiple authentication strategies depending on your integration tier and division access.
| Method | Use Case | Scope |
|---|---|---|
WithAPIKey() | Standard API access | Division-specific |
WithOAuth2Token() | Single Sign-On / Enterprise | Multi-division |
WithWorkloadIdentity() | Kubernetes / Serverless | Auto-refreshing |
// Enterprise OAuth2 with automatic token refresh
cfg := &oauth2.Config{
ClientID: "your-client-id",
ClientSecret: "your-client-secret",
Scopes: []string{"energy:read", "aerospace:write"},
}
client := aevum.NewClient(
aevum.WithOAuth2(cfg, aevum.RefreshInterval(45 * time.Minute)),
)
Client Configuration
Customize timeouts, retry logic, and gateway routing.
client := aevum.NewClient(
aevum.WithAPIKey("ak_live_..."),
aevum.WithTimeout(30 * time.Second),
aevum.WithRetry(
aevum.MaxAttempts(3),
aevum.Backoff(aevum.Exponential),
),
aevum.WithGateway("gateway.eu.aevumzenth.com"),
)
Cross-Division Calls
The SDK exposes division-specific namespaces. All endpoints share the same client instance and connection pool.
| Namespace | Package | Description |
|---|---|---|
| Energy | client.Energy | Grid telemetry, fusion research, smart meters |
| Aerospace | client.Aerospace | Orbital tracking, propulsion telemetry, defense |
| Finance | client.Finance | Trading engines, settlement, risk modeling |
| Health | client.Health | Clinical trials, genomic sequencing, telehealth |
| Logistics | client.Logistics | Fleet routing, warehouse automation, maritime |
Error Handling
All API errors implement the standard error interface and expose structured fields for programmatic handling.
_, err := client.Finance.ExecuteTrade(ctx, req)
if err != nil {
var apiErr *aevum.APIError
if errors.As(err, &apiErr) {
switch apiErr.Code {
case aevum.ErrInsufficientFunds:
log.Warn("Trading halted: margin requirement not met")
case aevum.ErrRateLimit:
time.Sleep(apiErr.RetryAfter)
default:
log.Errorf("API Error: %s (%s)", apiErr.Message, apiErr.RequestID)
}
}
}
Webhooks & Event Streams
Subscribe to real-time division events using the built-in event bus.
client.Events.Subscribe(ctx, "energy.grid.alerts", func(ev *aevum.Event) {
log.Printf("Grid Alert: %s | Severity: %s", ev.Payload["message"], ev.Severity)
})
Support & Resources
- GitHub: github.com/aevum-zenth/go-sdk
- Issues: Bug reports and feature requests
- Enterprise Support: support@aevumzenth.com
- Changelog: /docs/changelog
✅ Ready to build?
Generate your API key in the Developer Portal and start integrating with Aevum Zenth's global infrastructure today.