Summary
The Go front-office API is an empty HTTP server with no routes or external dependencies. This issue covers wiring the three core REST endpoints backed by the Rust gRPC API.
Acceptance Criteria
Dependencies
REST handlers
Middleware
Tests
Files
services/api/main.go, services/api/handlers/ (new), services/api/middleware/ (new)
Summary
The Go front-office API is an empty HTTP server with no routes or external dependencies. This issue covers wiring the three core REST endpoints backed by the Rust gRPC API.
Acceptance Criteria
Dependencies
go.mod:google.golang.org/grpc, generated proto client (or usebufto generate),github.com/jackc/pgx/v5,github.com/redis/go-redis/v9go.sumREST handlers
GET /v1/events— accepts query paramscontractId,topic0,topic1,ledgerFrom,ledgerTo,cursor,limit; proxies toListEventsgRPC; returns paginated JSONGET /v1/events/{id}— proxies toGetEventgRPC; returns single event JSON or 404GET /v1/health— returns{"status":"ok"}with 200Middleware
log/slog(method, path, status, latency, request_id)Tests
httptest)Files
services/api/main.go,services/api/handlers/(new),services/api/middleware/(new)