No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
baodata.go
baodata_test.go
client.go
doc.go
mock.go
notes.md
readme.md
server.go

readme.md

Baodata

A slow and simple datastore for gitbao.

The api uses REST-style endpoints to store data.

Get:

resp, err := baodata.Get("/users/1")
// resp => []{"id":"1", "email":"git@gitbao.com"}

resp, err := baodata.Get("/users")
// resp => []{"id":"1", "email":"git@gitbao.com"}

Put:

resp, err := baodata.Put("/users", baodata.Data{"email", "git@gitbao.com"})
// resp => []{"id":"2", "email":"git@gitbao.com"}

resp, err := baodata.Put("/users/2", baodata.Data{"email", "bao@gitbao.com"})
// resp => []{"id":"2", "email":"bao@gitbao.com"}

Delete:

err := baodata.Delete("/users/1")