Skip to content

rodrigodiez/zorro

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published