feat(go-services): inventory-go Phase A — read-side scaffold + simple endpoints
First slice of the inventory-service port, running in parallel READ-ONLY against the production inventory_db (never written): - main.go/store.go: pgx pool (forced read-only), enum-DB loader extracting AttributeSetInfo for set-name resolution, /health, /sets/list, /characters/list. - Dockerfile + compose service inventory-go (127.0.0.1:8772, enum JSON mounted). Validated vs the Python service on the same DB: /characters/list 167 chars exact counts; /sets/list 76 sets EXACT match (ids, names, counts). Remaining (large): /search/items (40+ filters + enrich_db_item), inventory fetch, item-processing ingestion (extract_item_properties), and the suitbuilder solver. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
5b2db439a3
commit
253250a01d
5 changed files with 330 additions and 0 deletions
12
go-services/inventory-go/Dockerfile
Normal file
12
go-services/inventory-go/Dockerfile
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
FROM golang:1.25-bookworm AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN go mod tidy
|
||||
ARG BUILD_VERSION=dev
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build \
|
||||
-trimpath -ldflags "-s -w -X main.buildVersion=${BUILD_VERSION}" -o /out/inventory-go .
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
COPY --from=build /out/inventory-go /inventory-go
|
||||
EXPOSE 8772
|
||||
ENTRYPOINT ["/inventory-go"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue