https://github.com/maxmcd/baodata
https://github.com/maxmcd/baodata
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxmcd/baodata
- Owner: maxmcd
- Created: 2015-10-04T22:18:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-08T23:13:46.000Z (over 9 years ago)
- Last Synced: 2025-03-17T20:11:59.414Z (about 1 month ago)
- Language: Go
- Size: 129 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Baodata
A slow and simple datastore for gitbao.
The api uses REST-style endpoints to store data.
Get:
```Go
resp, err := baodata.Get("/users/1")
// resp => []{"id":"1", "email":"[email protected]"}resp, err := baodata.Get("/users")
// resp => []{"id":"1", "email":"[email protected]"}
```Put:
```Go
resp, err := baodata.Put("/users", baodata.Data{"email", "[email protected]"})
// resp => []{"id":"2", "email":"[email protected]"}resp, err := baodata.Put("/users/2", baodata.Data{"email", "[email protected]"})
// resp => []{"id":"2", "email":"[email protected]"}
```Delete:
```Go
err := baodata.Delete("/users/1")
```