Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benjcal/pgroute
https://github.com/benjcal/pgroute
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/benjcal/pgroute
- Owner: benjcal
- Created: 2020-09-11T01:54:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T03:08:40.000Z (over 4 years ago)
- Last Synced: 2024-06-20T03:41:46.575Z (7 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pgroute
Simple library to expose all postgres pubic functions to HTTP.
Uses `chi` and `gorm`
### usage:
```golang
db, _ := gorm.Open(...)
r := chi.NewRouter()r.Mount("/f", pgroute.MountFunctionRoute(db))
``````sql
CREATE FUNCTION add_user(username TEXT, age INT) ...
``````sh
curl -X POST -d '{"username": "foo", "age": 22}'
```