Share API types between terdut-server, terdut-operator and terdut-tui #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
internal/tdclient/client.goredefines the server's models by hand (Team,DeadmanSwitch,Integration, the escalation request types, ...), and terdut-tui has a third copy ininternal/api/types.go. The workspace rule "any change to a server endpoint or JSON shape must be mirrored" is manual, and only a manual kind pass catches drift; the controller tests use a hand-written fake server.Options
terdut-apiGo module of request/response types.Why now
The Oct 2026 redesign changed several shapes at once (
external_idon teams,usernamein escalation targets, 409s on duplicate names, the removed endpoints); the only real check was a curl smoke test.Touches terdut-server and terdut-tui; filed here because the operator is the heaviest consumer.