margo

command module
v0.0.0-...-cdf3d8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2016 License: MIT Imports: 5 Imported by: 0

README

Margo: Rudimentary in-memory cache

Build Status

The purpose if this project is getting hands on experience with Go.

One thing to be aware of when looking at the source code is that most of it is generated. The design package contains the DSL that describes the API. The contents of the app, client, swagger and tool folders are all completely generated by the goagen tool. The storage package contains the storage logic and is the only non-generated directory apart from the design package.

Build

Assuming a working Go and make setup simply:

$ make

Build artifacts will be in the build directory.

Usage

CLI
$ ./build/margo-cli --help
CLI client for the Margo API service

Usage:
  Margo [command]

Available Commands:
  get         Get the value of a key.
  getElement  Get the element of the list or dict value stored at key.
  list        Retrieve all keys.
  remove      Delete a key.
  set         Set the value of a key.
  update      Update the value of a key.

Flags:
      --dump               Dump HTTP request and response.
  -H, --host string        API hostname (default "localhost:8080")
  -s, --scheme string      Set the requests scheme
  -t, --timeout duration   Set the request timeout (default 20s)

Use "Margo [command] --help" for more information about a command.
REST

The generated documentation for the REST API is available on swagger.goa.design.

Deploy

It's recommended to use Docker to deploy the service wherever you want:

$ docker run -d -p 8080:8080 31z4/margo

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
tool
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL