https://github.com/flume-cloud-services/cache
Golang key/value Database via HTTP (by Flume Cloud Services)
https://github.com/flume-cloud-services/cache
cloud database golang http http-server json key-value self-hosted
Last synced: 3 months ago
JSON representation
Golang key/value Database via HTTP (by Flume Cloud Services)
- Host: GitHub
- URL: https://github.com/flume-cloud-services/cache
- Owner: flume-cloud-services
- License: gpl-3.0
- Created: 2019-07-16T22:07:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-10T17:47:25.000Z (over 6 years ago)
- Last Synced: 2023-04-26T01:37:21.562Z (almost 3 years ago)
- Topics: cloud, database, golang, http, http-server, json, key-value, self-hosted
- Language: Go
- Homepage: https://flume-cloud-services.github.io/docs
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Cache
`Golang key/value Database` via **HTTP** (by Flume Cloud Services)
## Installation
### Docker
```bash
docker run -d -p 8080:8080 flumecloudservices/cache
```
### Manually
```bash
mkdir $GOPATH/src/github.com/flume-cloud-services && cd $GOPATH/src/github.com/flume-cloud-services
git clone https://github.com/flume-cloud-services/cache.git && cd cache
go get -d -v
go install -v
FLUME_CACHE_ADMIN=admin_name FLUME_CACHE_SECRET=secret_token cache
```
## Usage
Use the `signin` route with the following body to generate the JWT token :
```
POST /signin
Body:
- name: The admin name given in FLUME_CACHE_ADMIN by default it's simply "admin"
Return:
- If success :
- A JWT Token
- The cookie with the previously generated JWT Token
- If failed :
- Unauthorized Status
- Bad request Status
```
Check if the jwt is correctly generated by visiting `welcome` route :
```
GET /welcome
Return:
- If success :
- Welcome to you visitor !
- If failed :
- Unauthorized Status
```
Then insert data using the `/insert` route :
```
POST /insert
Body:
- key: The key name to access the given value
- value: The value of the key
Return:
- If success :
- Data succesfully inseted
- If failed :
- Bad Request Status
- Internal Server Error Status
```
Finally get this data using the `/get` route :
```
POST /get
Body:
- key: the key of the desired data
Return:
- If success :
- The desired data
- If failed :
- Bad Request Status
- Internal Server Error Status
```