The Go SDK is served as a standard Go module. There is no separate package registry - go get resolves the module directly via proxy.golang.org, which caches it from the public GitLab repository.
Install
Pin a specific version (recommended for libraries):
Add the import to your code:
The nexus alias is conventional - every example in this documentation uses it. Without an alias the package name would also be nexus (it’s the package name declared in client.go), but the explicit alias makes the import path obvious to readers.
Requirements
- Go 1.26 or newer
- Network access to
proxy.golang.org for installation, and to <your-slug>.westyx.dev at runtime
How go get resolves this module
- You declare
gitlab.com/westyx/nexus/sdk/go in your go.mod (either directly or via go get).
- The Go toolchain queries
proxy.golang.org for the module’s metadata.
- On a cache miss, the proxy fetches the module from the public GitLab repository at the same path and caches it.
- Subsequent users hit the proxy cache - no GitLab traffic.
This is the default Go module flow - it works with no extra configuration on your machine.
Behind a firewall / GOPRIVATE
If proxy.golang.org is unreachable from your build environment, set GOPROXY=direct (or GOPROXY=https://your-internal-proxy) and ensure your build agents can reach gitlab.com directly. No authentication is required - the repository is publicly readable.
If your organisation policy treats gitlab.com as private:
This tells the toolchain to skip proxy.golang.org and sum.golang.org for that path prefix, fetching directly via git over HTTPS.
Verifying installation
Should print:
If the command reports a different (older) version, run go get -u gitlab.com/westyx/nexus/sdk/go to upgrade.
Verifying connectivity
Before writing any Go code, you can confirm your endpoint and API key are correct with a plain curl:
A valid response returns a JSON snapshot with your configs, secrets, and flags. An HTTP 401 means the key is wrong; HTTP 404 means the slug is wrong.
To watch the live SSE stream:
You should see event:resync arrive within a second. Press Ctrl+C to stop.
Troubleshooting
The import path is case-sensitive. The trailing /go is part of the path - don’t drop it.
module not found - check the import path is exactly gitlab.com/westyx/nexus/sdk/go.
proxy.golang.org returned 410 Gone - typical when a tag is force-deleted. Pin to a known-good version or wait ~30 minutes for the proxy to refresh its cache.
unknown revision v0.X.Y - the tag exists locally but proxy.golang.org hasn’t seen it yet. Wait a minute, then retry; or GOPROXY=direct go get ... to bypass the proxy.