Bezeichner serves bezeichner.v1.Service over gRPC and HTTP. The HTTP RPC
gateway accepts POST requests at the generated gRPC full method names, such as
/bezeichner.v1.Service/GenerateIdentifiers. See the
protobuf contract for the request and
response schemas.
Start the server with the README quickstart to try the examples.
ListApplications lists configured generator application names and kinds,
mapper application names, supported generator kinds, and effective request
limits. It exposes discovery data only.GenerateIdentifiers generates count identifiers for a configured
application. A count of zero returns an empty result when the application
and its generator kind resolve.MapIdentifiers returns one result per input, in request order, including
duplicates. Each result includes the input id and includes mapped only if
the ID is in the application’s mapping. An empty list returns an empty result
when the mapper application exists.The meta map is reserved for transport and service metadata, such as
request_id and user_agent when available.
| gRPC status | HTTP status | Cause |
|---|---|---|
InvalidArgument |
400 |
The requested generation count or mapping list length exceeds the effective limit. |
NotFound |
404 |
The generator or mapper application is unknown, the generator kind cannot be resolved, or mapper configuration is absent. |
HTTP returns these errors with a text/error response body. See
request limits for defaults and configuration.
The examples use JSON on port 11000.
List configured applications and limits.
curl -fsS \
-H 'Content-Type: application/json' \
-d '{}' \
http://localhost:11000/bezeichner.v1.Service/ListApplications
Generate two identifiers.
curl -fsS \
-H 'Content-Type: application/json' \
-d '{"application":"uuid","count":2}' \
http://localhost:11000/bezeichner.v1.Service/GenerateIdentifiers
Map a known ID and an unknown ID.
curl -fsS \
-H 'Content-Type: application/json' \
-d '{"application":"uuid","ids":["req1","req3"]}' \
http://localhost:11000/bezeichner.v1.Service/MapIdentifiers
The response’s ids array contains these entries.
[
{"id": "req1", "mapped": "resp1"},
{"id": "req3"}
]
Use buf curl with the local gRPC port 12000. The development config uses
plaintext and the server provides gRPC reflection.
List configured applications and limits.
buf curl --protocol grpc \
-d '{}' \
http://localhost:12000/bezeichner.v1.Service/ListApplications
Generate two identifiers.
buf curl --protocol grpc \
-d '{"application":"uuid","count":"2"}' \
http://localhost:12000/bezeichner.v1.Service/GenerateIdentifiers
Map a known ID and an unknown ID.
buf curl --protocol grpc \
-d '{"application":"uuid","ids":["req1","req3"]}' \
http://localhost:12000/bezeichner.v1.Service/MapIdentifiers