/keyvaluestore

A naive, in-memory key-value store served through an HTTP API.

Primary LanguageGo

keyvaluestore

A naive key value store implemented in Go, serving over HTTP.

Features

HTTP API

Setting a value

Update the key testKey to the value testValue by sending a POST request. This is modelled as a POST request because it is a non-idempotent operation: the key's history is updated.

curl -X POST 'localhost:8080/entries/testKey' -d '{"value":"testValue"}'

Getting a value

Get the value of the key testKey by sending a GET request.

curl -X GET 'localhost:8080/entries/testKey'

Getting the history

curl -X GET 'localhost:8080/entries/testKey/history'

Deleting all history

curl -X DELETE 'localhost:8080/entries/testKey/history'