Go SDK¶
Module path (identity, enforced by packaging checks):
github.com/eve-iac/eve-iac/sdk/go
Import the client package:
github.com/eve-iac/eve-iac/sdk/go/eveiac
There is no public module proxy. Download the tarball (GitLab generic package, same file as the Release):
curl -fsSL -O https://gitlab.com/api/v4/projects/eve-ng-dev%2Feve-iac/packages/generic/eve-iac/0.4.2/eve-iac-sdk-go-0.4.2.tar.gz
tar xzf eve-iac-sdk-go-0.4.2.tar.gz
go mod edit -replace github.com/eve-iac/eve-iac/sdk/go=./eve-iac-sdk-go-0.4.2
go get github.com/eve-iac/eve-iac/sdk/go@v0.0.0
Do not change this repository's go.mod to a GitLab path. Details: Install packages.
Create a client¶
client, err := eveiac.NewClient(eveiac.Config{
URL: "https://eve.example:8787",
Token: "",
CAPEM: caPEM,
TimeoutMs: 15000,
})
HTTPS is required. Pin CAPEM. NewClientWithTransport injects a fake transport in tests.
Pointers¶
nilpointer = omittedeveiac.Ptr(false)= explicit falseeveiac.Ptr(0)= explicit zero- Typed structs may not represent every explicit-null case
Client.Dois the escape hatch for a raw operationId + body
Every method takes context.Context. Optional timeoutMs ...int overrides the semantics timeout.