Skip to content
A simple URL Shortener
Go Makefile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
auth
cmd
config
contrib/systemd
io
messaging
middleware
pb
pkg
server/abraracourcixd
storage
third_party/swagger-ui
tracing
transport
vendor
version
.dockerignore
.gitignore
.gitlab-ci.yml
.projectile
API.md
CONTRIBUTING.md
ChangeLog.md
Dockerfile
LICENSE
Makefile
README.md
abraracourcix.toml

README.md

Abraracourcix

License Apache 2 GitHub version

Master :

  • Circle CI

Develop :

  • Circle CI

This tool is a simple URL Shortener written in Golang (Require 1.8) Abraracourcix uses gRPC for its message protocol.

The project includes 2 command line utilities:

  • abraracourcixctl, to communicate with a server abraracourcixd
  • abraracourcixadm, an administration tool to manage the server.

For gRPC-supported languages, Abraracourcix provides a JSON gateway, which provides a RESTful proxy that translates HTTP / JSON requests to gRPC messages.

Metrics for Prometheus are exported.

Application traces are available using OpenTracing. Supported systems are:

Storage backends are :

Installation

You can download the binaries :

Abraracourcixd

Abraracourcixctl

Abraracourcixadm

Usage

Launch Zipkin with Docker, and open a browser on 9411:

$ docker run -d -p 9411:9411 openzipkin/zipkin

or Jaeger with Docker (open a browser on 16686):

$ docker run -d -p5775:5775/udp -p16686:16686 jaegertracing/all-in-one:latest

Use the abraracourcixd CLI to launch a server:

$ abraracourcixd run --config abraracourcix.toml -v 2 --alsologtostderr

Configure CLI:

$ export ABRARACOURCIX_SERVER="localhost:8080"
$ export ABRARACOURCIX_USERNAME="admin"
$ export ABRARACOURCIX_APIKEY="nimda"

Use the abraracourcixctl CLI to use the URLs informations :

$ abraracourcixctl url list
URLs:
$ abraracourcixctl url add --link https://news.google.fr/
URL:
- Key: 5X81VNCDVq
- Link: https://news.google.fr/
- Date: 2017-06-13 17:08:48.898220331 +0200 CEST
$ abraracourcixctl url list
URLs:
- 5X81VNCDVq
$ abraracourcixctl url get --key 5X81VNCDVq
URL:
- Key: 5X81VNCDVq
- Link: https://news.google.fr/
- Date: 2017-06-13 17:08:48.898220331 +0200 CEST

Use the abraracourcixadm CLI to manage the server.

$ abraracourcixadm health
+------------+--------+---------+
|  SERVICE   | STATUS |  TEXT   |
+------------+--------+---------+
| UrlService | OK     | SERVING |
+------------+--------+---------+

$ abraracourcixadm info
+----------------+----------------+---------+--------+
|    SERVICE     |      URI       | VERSION | STATUS |
+----------------+----------------+---------+--------+
| abraracourcixd | localhost:8080 | 2.0.0   | OK     |
+----------------+----------------+---------+--------+

You could explore the API using Swagger UI :

http://localhost:9090/swagger-ui/

Development

  • Initialize environment

      $ make init
    
  • Build tool :

      $ make build
    
  • Start backends :

      $ docker run -d -p 6379:6379 --name redis redis:3
      $ docker run -d -p 27017:27017 --name mongo mongo:3.1
    
  • Launch unit tests :

      $ make test
    

Contributing

See CONTRIBUTING.

License

See LICENSE for the complete license.

Changelog

A changelog is available

Contact

Nicolas Lamirault nicolas.lamirault@gmail.com

You can’t perform that action at this time.