ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - codingsince1985/couchcache: A RESTful caching micro-service in Go backed by Couchbase
A RESTful caching micro-service in Go backed by Couchbase - codingsince1985/couchcache
Visit Site

GitHub - codingsince1985/couchcache: A RESTful caching micro-service in Go backed by Couchbase

GitHub - codingsince1985/couchcache: A RESTful caching micro-service in Go backed by Couchbase

Couchcache

PkgGoDev Go Report Card

A caching service developed in Go. It provides REST APIs to access key-value pairs stored in Couchbase.

You may also consider using couchcache as a mocked service when doing TDD.

To start couchcache

Run couchcache with Couchbase server (host and port) and bucket (name and password) information

./couchcache --host=HOST --port=PORT --bucket=BUCKET --pass=PASS

Example

./couchcache --host=10.99.107.192 --port=8091 --bucket=cachebucket --pass=c@che1t

Default values

host: localhost
port: 8091
bucket: couchcache
pass: password

Cache service endpoint

http://HOST:8080/key/KEY

Examples

http://10.99.107.190:8080/key/customer_555

http://10.99.107.190:8080/key/the_service_i_want_to_mock-endpoint_a, if you're mocking other service's endpoint

To store a key-value pair

  • request
    • send POST request to endpoint with data in body
    • optionally set TTL by ?ttl=TTL_IN_SEC
  • response
    • HTTP 201 Created if stored
    • HTTP 400 Bad Request if key or value is invalid

To retrieve a key

  • request
    • send GET request to endpoint
  • response
    • HTTP 200 OK with data in body
    • HTTP 404 Not Found if key doesn't exist
    • HTTP 400 Bad Request if key is invalid

To delete a key

  • request
    • send DELETE request to endpoint
  • response
    • HTTP 204 No Content if deleted
    • HTTP 404 Not Found is key doesn't exist
    • HTTP 400 Bad Request if key is invalid

To append data for a key

  • request
    • send PUT request to endpoint with data in body
  • response
    • HTTP 200 OK if appended
    • HTTP 404 Not Found if key doesn't exist
    • HTTP 400 Bad Request if key or value is invalid

Limitations

  • Max key length is 250 bytes
  • Max value size is 20 MB

See Couchbase Limits.

License

couchcache is distributed under the terms of the MIT license. See LICENSE for details.

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory