Skip to content

richard-lyman/bob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc

Acronym

Binary Large OBject store

Overview

A micro REST interface to Redis (that can't get smaller).

POST HTTP requests are a call to SET in Redis using the POSTed body as the content.

GET HTTP requests are a call to GET in Redis.

The Redis key used in calls to GET and SET is only the first URL Path Segment (see RFC 3986).

Building

  1. Install golang
  2. go get ./...
  3. go build

Options

Flag Type Default Option Explanation
lockVersions bool false true Setting lockVersions to true will use a Redis SET call with the NX flag. The default is a regular SET call in Redis.
hostPort string ":8080" Any valid host:port This is the host:port that bob will listen on.
redisHostPort string "127.0.0.1:6379" The host:port for Redis (Self explanatory)

Examples

  1. Run bob on port 8081 using lockVersions
./bob -lockVersions=true -hostPort ":8081"
  1. Store content
curl -v -X POST --data-binary "@locationOfSomeFile" :::8081/someKey
  1. Get content
curl -v :::8081/someKey
  1. Fail to modify content
curl -v -X POST --data-binary "@locationOfSomeFile" :::8081/someKey

About

Binary OBject store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages