https://github.com/crhntr/proto-play
Playing with protobuf, Postgres, and Go
https://github.com/crhntr/proto-play
bufbuild connect experiment go goose grpcurl postgresql protobuf sqlc
Last synced: 3 months ago
JSON representation
Playing with protobuf, Postgres, and Go
- Host: GitHub
- URL: https://github.com/crhntr/proto-play
- Owner: crhntr
- Created: 2025-01-22T18:06:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-08T07:23:15.000Z (4 months ago)
- Last Synced: 2025-02-28T16:27:36.483Z (3 months ago)
- Topics: bufbuild, connect, experiment, go, goose, grpcurl, postgresql, protobuf, sqlc
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playground for Postgres+Protobuf
```sh
goose -dir migrations postgres "host=${PGHOST} dbname=${PGDATABASE} ${PGQUERYSTRING} user=${PGUSER}" up
```GRP CURL
```sh
grpcurl -d '{"query": {"un": {"value": "EXAMPLE"}}}' -plaintext -proto ./proto/api/playground/v1/playground.proto localhost:8767 api.playground.v1.StoreService/Exists
```Add these to get an unmarshal error.
```
insert into messages (id, content)
values (1, '{"un": {"value": "EXAMPLE"}}'),
(2, '{"un": {"value": "a"}}'),
(3, '{"un": {"value": "b"}}'),
(4, '{"pn": {"last": "l", "first": "f"}}'),
(5, '{"pn": {"last": "ll", "first": "ff"}}'),
(30, '{"pn": {"last": "ll", "first": "f2"}}'),
(34, '{"pn": {"last": "ll", "first": "f3"}}'),
(38, '{"pn": {"last": "ll", "first": "f3", "middle": ["m1", "m2"]}}'),
(41, '{"pn": {"last": "ll", "first": "f3", "middle": ["m1", "m2", "m3"]}}');
```