flume-cloud-services / cache

Golang key/value Database via HTTP (by Flume Cloud Services)

Home Page:https://flume-cloud-services.github.io/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Cache

Golang key/value Database via HTTP (by Flume Cloud Services)

Installation

Docker

docker run -d -p 8080:8080 flumecloudservices/cache

Manually

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

About

Golang key/value Database via HTTP (by Flume Cloud Services)

https://flume-cloud-services.github.io/docs

License:GNU General Public License v3.0


Languages

Language:Go 85.7%Language:Dockerfile 14.3%