Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/healeycodes/tinyinfra
🏗 A simple key/value store (get/set) and queue (send/receive/delete).
https://github.com/healeycodes/tinyinfra
gorm keyvaluestore
Last synced: 9 days ago
JSON representation
🏗 A simple key/value store (get/set) and queue (send/receive/delete).
- Host: GitHub
- URL: https://github.com/healeycodes/tinyinfra
- Owner: healeycodes
- Created: 2022-12-13T13:15:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T15:10:08.000Z (about 2 years ago)
- Last Synced: 2024-10-05T17:42:45.284Z (3 months ago)
- Topics: gorm, keyvaluestore
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Go](https://github.com/healeycodes/tinyinfra/actions/workflows/go.yml/badge.svg)](https://github.com/healeycodes/tinyinfra/actions/workflows/go.yml)
# 🏗 tinyinfra
A little learning project. A key/value store (get/set) and queue (send/receive/delete).
Built with Go's standard library and [GORM](https://gorm.io/).
- GET **/user/new**
- (returns `token` to be used via Bearer authentication for all other endpoints)
- POST **/kv/set** `{"key": "some_key", "value": "some_value", "ttl": 1671543399714}`
- (`ttl` is optional)
- GET **/kv/get** `{"key": "some_key"}`
- (returns `key`, `value`, `ttl`)
- POST **/queue/send** `{"namespace": "some_namespace", "message": "some_message"}`
- GET **/queue/receive** `{"namespace": "some_namespace", "visibilityTimeout": 20000}`
- (returns `namespace`, `message`, `id`)
- POST **/queue/delete** `{"namespace": "some_namespace", "id": 1}`## Tests
Integration tests (a few tests per endpoints) run with `go test ./...`
End-to-end tests (fairly simple) run with `python e2e.py`
## Dev
`go run .`