zorro

module
v0.0.0-...-360b30e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: MIT

README ΒΆ

Zorro

build Go Report Card MIT License

Zorro is a microservice and a golang package to mask/unmask strings. It supports multiple transports, storage engines and mask generators.

gopher


Important: Zorro is under heavy development at the moment and its usage in production is not recommended


Table of contents

Use cases

  • Services that want to mask their private IDs while keeping the ability to resolve them later

Installation

# will install `zorro-http` and `zorro-grpc` servers in your $GOPATH/bin
go get -u github.com/rodrigodiez/zorro/...

HTTP example

# Run zorro http server with memory storage
zorro-http --port 8080 --storage-driver memory --debug

# Run zorro http server with BoltDB storage (initialises a new db if $BOLTDB_PATH does not exist)
zorro-http --port 8080 --storage-driver boltdb -storage-path $BOLTDB_PATH --debug

# Run zorro http server with DynamoDB storage (requires tables to configured with an ID -string- hash key and AWS credentials available in the environment)
zorro-http --port 8080 --storage-driver dynamodb -dynamodb-keys-table $DINAMODB_KEYS_TABLE -dynamodb-values-table $DINAMODB_VALUES_TABLE -aws-region $AWS_REGION --debug

# Mask
curl -X POST http://localhost:8080/mask/<key>

# Unmask
curl -X POST http://localhost:8080/unmask/<value>

# Metrics
curl http://localhost:8080/debug/vars

gRPC example

# Same storage options as zorro-http are accepted, we omit them here for simplicity

# Run zorro gRPC server with memory storage
zorro-grpc --port 8080 --storage-driver memory

For interacting quickly with the gRPC server you can use a tool like grpcc.

Important: at the moment TLS is not supported so make sure to use your client in insecure mode.

Servers

  • HTTP βœ”
  • GRPC βœ” (not tls support yet)
  • HTTPS πŸ”œ
  • Twirp πŸ”œ

Mask generators

  • UUIDv4 βœ”

Storages

  • In-Memory βœ”
  • Bolt βœ”
  • DynamoDB βœ”
  • Google Cloud Datastore βœ”
  • Redis πŸ”œ
  • MySQL πŸ”œ

Protobuf

.proto files for the gRPC server can be found here

With these files you can automatically generate gRPC clients for multiple languages including Go, Java, C++, Python, Ruby, C#, PHP...

Have a look to the gRPC and Protocol Buffers documentation for more info.

Contributing

If you want to contribute to the development of Zorro you are more than welcome!

  • Fixes: Go ahead and create a PR! :D
  • Enhancements: Have a look to the open issues. If your enhancement does not fit any of the existing ones please create a new issue and describe your use case so we can discuss how to make it real! :D

Author

My name is Rodrigo DΓ­ez Villamuera. Above anything else I am a passionate maker

I started Zorro as a way to increase my experience with Golang. Zorro allows me to explore the language from a practical point of view.

I am available to hire as a contractor. I am specialised in

  • PHP/Go/Node development
  • AWS Solutions
  • Team leadership
  • Agile development

If you need a hand or two... contact me! Linkedin | rodrigodiez.io

License

Zorro is free software and it is distributed under the terms and conditions of the MIT License.

Directories ΒΆ

Path Synopsis
cmd
lib
cli
mocks/dynamodbapi
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
mocks/generator
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
mocks/metrics
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
mocks/service
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
mocks/storage
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
mocks/storage/datastore
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
random
Package random provides with tools to create random data
Package random provides with tools to create random data
pkg
service
Package service contains interfaces and concrete implementations to manage Zorro.
Package service contains interfaces and concrete implementations to manage Zorro.

Jump to

Keyboard shortcuts

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