This Project is Experimental
humbase is BaaS(Backend as a Service), influenced by Firebase .
go run main.go --config config.yaml
listenAddress: localhost
listenPort: 8888
auth:
secret: test-secret
store:
apiKey: test-store-api-key
email and password authentication.
POST /api/v0/auth/sign-up
{
"email": "user@example.com",
"password": "passw0rd"
}
200 Response
{
"token": "jwt token..."
}
POST /api/v0/auth/sign-in
Request
{
"email": "user@example.com",
"password": "passw0rd"
}
200 Response
{
"token": "jwt token..."
}
POST /api/v0/auth/verify
Request
{
"token": "jwt token..."
}
200 Response
{
"status": "valid"
}
DELETE /api/v0/auth/sign-out
Request
{
"token": "jwt token..."
}
200 Response
{}
key value store used Golang map[string]interface{}
Request Header
Content-Type: application/json
humbase-store-api-key: apiKey-specified-in-config
GET /api/v0/store
Request
{}
200 Response
{
"data": [
"unique id...": {
}
]
}
GET /api/v0/store/:id
Request
{}
200 Response
{
"data": {
}
}
create or update(overwrite data)
POST /api/v0/store
Request
{
"id": "unique id",
"data": {
}
}
200 Response
{
"data": {
"unique id": {
}
}
}
delete key and data
DELETE /api/v0/store/:id
Request
{}
200 Response
{}