⚡ Go 1.21+ Required

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.

terminal
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.

main.go
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.

MethodUse CaseScope
WithAPIKey()Standard API accessDivision-specific
WithOAuth2Token()Single Sign-On / EnterpriseMulti-division
WithWorkloadIdentity()Kubernetes / ServerlessAuto-refreshing
auth_example.go
// 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.

config.go
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.

NamespacePackageDescription
Energyclient.EnergyGrid telemetry, fusion research, smart meters
Aerospaceclient.AerospaceOrbital tracking, propulsion telemetry, defense
Financeclient.FinanceTrading engines, settlement, risk modeling
Healthclient.HealthClinical trials, genomic sequencing, telehealth
Logisticsclient.LogisticsFleet routing, warehouse automation, maritime

Error Handling

All API errors implement the standard error interface and expose structured fields for programmatic handling.

errors.go
_, 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.

events.go
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.