Skip to content

Go client library

To use this library add a reference to the Go module:

go get go.enpowerx.io/apis

Sample code to list Offers:

conn, err := epx.DialFromConfig(ctx, &dialer.APIConfig{
    URL:             "https://apis.enpowerx.io:443",
    OIDCEndpointURL: "https://auth.enpowerx.io",
    ClientID:        "myId",
    ClientSecret:    "mySecret",
  })
if (err != nil) {
  return nil, err
}

response, err := resources.NewOffersClient(conn).List(ctx, &resources.OffersListRequest{
  Tenant: tenant,
  // ...
})
if (err != nil) {
  return nil, err
}