Releases: slimcdk/go-eloverblik
Releases · slimcdk/go-eloverblik
Release list
v1.3.0
This is a minor version, but it is not source-compatible for every consumer.
Nothing was removed, and ordinary call sites keep compiling; the exact breaks are
listed below so nobody has to discover them from a failing build. Several bug
fixes also change results for code that compiles unchanged — those are listed
too, because they are the ones most likely to surprise.
Breaking: code that no longer compiles
ClientgainedGetChargeLinksWithCharges,RefreshTokenClaimsand
DataAccessTokenClaims. Anything that implementsClient,Customeror
ThirdParty— typically a test double — must implement them as well. Code that
only calls the interfaces is unaffected.NewCustomerandNewThirdPartytake functional options:
func(string, ...Option). Existing calls such asNewCustomer(token)compile
unchanged; assigning the constructor to afunc(string) Customervariable no
longer does.ThirdPartyMeteringPointis no longer comparable, because it now carries the
child metering points the API returns.==on two values, or using one as a
map key, no longer compiles.
Breaking: code that compiles but behaves differently
GetDatesFromPeriodnow returns a half-open range:tois the start of the
period that follows. The API readsdateToas exclusive, so the old inclusive
bound madeyesterdayfail outright (dateFrom == dateTois rejected with
error 30002) and madelast_week,last_monthandlast_yearsilently drop
their final day.- Requests that fail with 401, 429 or 503 now return an error. They previously
returned an empty result and a nil error, so an expired token or a rate limit
looked like "no data". TimeSeries.Flatten()derives each point's interval from the period's
resolution and steps by calendar unit. Day, Month and Year points, and any day
containing a daylight saving transition, previously got wrong intervals — for
some resolutions a zero-width one.GetMeteringPoints(includeAll)now actually sendsincludeAll. It was sent as
a path parameter to a path with no placeholder, so resty dropped it and the
argument had no effect.
Added
--print-response-headerson the CLI andWithResponseHeaderOutput(w)in the
library, printing the response status and headers of every API call. It is
implemented as a transport wrapper, so it also works for the streamed exports.WithRetry(count, maxWait)andWithoutRetry(). The client now retries 429 and
503 with a backoff instead of failing on the API's rate limit.ParseToken,TokenClaimsand thetokencommand, for reading the claims of a
refresh or data access token. Claims are decoded, not verified.GetChargeLinksWithChargesand thecharge-linkscommand. Note that the
endpoint answers 404 on both the Customer and the ThirdParty API as of
2026-07-13, although it is documented; the client is ready for the day it is
deployed.APIError, carrying the status code, the API's error code, and thetraceId
from the problem document, and unwrapping to the existing sentinel errors.ErrorNoCprConsent(10007).- The response fields the API returns but the client silently dropped, across
metering point details, contact addresses, charges and third party metering
points. - The
P1D,P1YandPXDresolutions from the specification, accepted
alongside thePT1DandPT1Ythe live API actually sends.
Fixed
- Error responses are parsed in both shapes the API answers with: an RFC 7807
problem document and a bare JSON string such as"[20010] Relation not found".
A 404 used to surface ascould't connect to eloverblik: 404with the
traceIdthrown away. customer aliveprobed the ThirdParty host. A single command object was added
to two cobra parents, and the last parent won.- Every request pins
api-version: 1.0, so a future default version on the
server cannot change the responses underneath the client.
CI
- Releases are built by GoReleaser on a
v*tag: five platforms, archives and
checksums. govulncheckand CodeQL run on every push and weekly; Dependabot now covers Go
modules and GitHub Actions, not just the devcontainer.- The lint job could never have passed:
version: latestinstalls golangci-lint
v2, which rejects a v1 configuration. The configuration is migrated and the
action and linter are pinned.
Changelog
Features
- b2d6f16 feat: add --print-response-headers flag and WithResponseHeaderOutput option
- cf13191 feat: add getchargelinkswithcharges, the last unimplemented endpoint
- 6347736 feat: decode token claims, and a
tokencommand to read them - 56b92a4 feat: model the response fields the API returns but the client dropped
Bug fixes
- 8c584a9 fix(deps): Bump github.com/go-resty/resty/v2 (#1)
- 45dfe82 fix: handle every time series resolution and send includeAll as a query param
- a79c05f fix: read both error body shapes the API answers with
- 1cce5e2 fix: request periods as a half-open range, so no day is dropped or rejected
- f06aa15 fix: surface API failures, retry rate limits, pin api-version, fix customer alive
Documentation
- ded54e0 docs: add a changelog, and publish it as the release notes
- 4e2bbe1 docs: rewrite the documentation around what the API actually does
CI
- 4bdc449 ci(deps): Bump actions/cache from 4 to 6 (#4)
- 4f7701b ci(deps): Bump actions/setup-go from 5 to 6 (#3)
- 2551228 ci(deps): Bump github/codeql-action from 3 to 4 (#6)
- 3bb046c ci(deps): Bump golangci/golangci-lint-action from 8 to 9 (#5)
- 1fda2bd ci(deps): bump actions/checkout from 4 to 7 (#2)
- 28ebd36 ci: drop the API drift workflow
- f7390e2 ci: repair the lint job, which could not have passed
- 6dbdd3f ci: ship real releases, watch the API for drift, scan for vulnerabilities
Install
Download the archive for your platform below, verify it against
checksums.txt, unpack it and put go-eloverblik on your PATH.
Or install with Go:
go install github.com/slimcdk/go-eloverblik@v1.3.0relative time parsers and period specification
What's New
- Relative date parsing for
--from/--toflags:now,now-30d,now-4w,now-2m,now-1y - Predefined
--periodflag:yesterday,this_week,last_week,this_month,last_month,this_year,last_year GetDatesFromPeriod()library helper for Go package consumers- All CLI commands now output consistent JSON (replaced gout with encoding/json)
- Fixed
errchecklint errors onoutput.Writecalls - Fixed test isolation issues with cobra flag state
- Updated documentation for Go library and CLI usage
fix rename binary when running go install
v1.1.1 fix rename binary to elob
v1.0.1: fix: remove .github/README.md to use root README
Removed .github/README.md so GitHub displays the root README.md on the repository main page instead. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>