This repository contains Bezeichner, a Go service that generates and maps identifiers, exposed via gRPC and HTTP.
HTTP is implemented as an RPC gateway that routes by gRPC full method name.
Use bin/AGENTS.md for shared skills and cross-repository defaults.
Before recording a finding, audit entry or proposed change, read the accepted-design index and its relevant area files. Apply the recorded scope of each decision. Add owner-accepted design choices, tradeoffs and dependency limitations to the relevant area file as they are agreed.
go.mod for module path and toolchain details.api/bezeichner/v1/service.proto (+ generated Go stubs under api/ and Ruby stubs under test/lib).Makefile is a thin wrapper around the bin/ git submodule (see .gitmodules:1-3 and Makefile:1-5).Most make targets come from the bin/ submodule.
Use make submodule once the shared bin checkout is present; see
bin/AGENTS.md for fresh-clone bootstrap details.
make dep
Observed behavior:
bin/build/make/_service.mak:135-155
and bin/build/make/_service.mak:195-197).test/ and are installed by the
shared Ruby dependency target (see bin/build/make/ruby.mak:17-22 and
test/.bundle/config:1-2).make build # builds ./bezeichner (release binary)
make build-test # builds ./bezeichner test binary (-tags features, -race, coverage enabled)
Implementation: bin/build/make/_service.mak:191-197.
make specs # Go test suite (gotestsum + race + coverage)
make features # end-to-end features under test/ (Ruby + nonnative harness)
make benchmarks # Ruby benchmark harness
make coverage # HTML + func coverage reports
Notes:
main_test.go is guarded by build tag features (main_test.go:1-11).make features depends on make build-test (see bin/build/make/_service.mak:107-109).make lint
make fix-lint
make format
make sec
make lint, make fix-lint, and
make format. Generated protobuf code is excluded (.golangci.yml:33-51).make proto-lint
make proto-format
make proto-generate
make proto-breaking
make proto-stale
Buf config is in api/:
api/buf.yaml, api/buf.gen.yamltest/lib (see api/buf.gen.yaml:11-14).make dev
This uses air to rebuild/run the server:
See bin/build/make/grpc.mak:51-53.
make start
make stop
These call scripts under bin/build/docker/env (see bin/build/make/_service.mak:239-245).
main.go constructs a go-service/v3/cli application and registers the server command (main.go:10-15).internal/cmd/server.go:9-12 and wires DI via internal/cmd/module.go:13-19.The service uses go-signal/v2 modules:
internal/cmd/module.go:13-19
module.Server (from go-service/v3)config.Module, health.Module, generator.Module, v1.ModuleThe v1 module wires transports and the domain service:
internal/api/v1/module.go:11-17.internal/api/ids/
Identifier.Applications, Identifier.Generate, and Identifier.Map
(internal/api/ids/applications.go and internal/api/ids/ids.go).internal/limits.Config.internal/api/v1/transport/grpc/* implements the protobuf service.internal/api/v1/transport/grpc/error.go:9-15.internal/api/v1/transport/http/http.go:9-13 routes HTTP RPC calls by gRPC full method name.A representative config used by dev/feature tests is test/.config/server.yaml.
Notable keys observed:
generator.applications[]: generator applications (name and kind).mapper.applications[]: mapper applications (name and identifiers) for MapIdentifiers.transport.http.address to
tcp://:11000 and transport.grpc.address to tcp://:12000.Notes:
name_; typeid uses the application name as its TypeID prefix.mapper is optional at startup; if it is omitted, all MapIdentifiers requests return NotFound.MapIdentifiers returns one result per input ID in request order; missing input IDs omit the optional mapped value instead of failing the whole request.api/bezeichner/v1/service.proto.Generator implementations are in internal/generator/* and are selected by Application.Kind.
Standard kinds such as uuid, ksuid, ulid, xid, and nanoid are adapted
from github.com/alexfalkowski/go-service/v3/id.
internal/generator/generator.go:17-27.internal/generator/config.go:3-33.Limits are enforced in the domain layer:
GenerateIdentifiers: count is capped in internal/api/ids/ids.go using internal/limits.Config.MapIdentifiers: number of IDs is capped in internal/api/ids/ids.go using internal/limits.Config.These surface to clients as InvalidArgument via the gRPC error mapper (internal/api/v1/transport/grpc/error.go:9-14).
make specs runs gotestsum with race and coverage (see bin/build/make/_service.mak:115-118). Outputs land under test/reports/.
test/features/**.test/nonnative.yml.
../bezeichner server -config file:.config/server.yaml (test/nonnative.yml:6-12).test/.config/cucumber.yml:1.If the Ruby harness fails loading native gems, refresh dependencies through the repository Make targets before trying ad hoc tool commands.
.editorconfig:16-18).api/**/*.pb.go / api/**/*_grpc.pb.go; regenerate via make proto-generate.The primary CircleCI build-service job runs (see .circleci/config.yml):
make dep, make lint, make proto-breaking, make proto-stale, make secmake features, make benchmarks, make analyse, make coverage, make codecov-uploadThe workflow also runs Docker image validation on non-master branches:
make platform=amd64 test-dockermake platform=arm64 test-docker