Khan will drive all your enemies to the sea (and also take care of your game's clans)!
What is Khan? Khan is an HTTP "resty" API for managing clans for games. It could be used to manage groups of people, but our aim is players in a game.
Khan allows your app to focus on the interaction required to creating clans and managing applications, instead of the backend required for actually doing it.
- Multi-tenant - Khan already works for as many games as you need, just keep adding new games;
- Clan Management - Create and manage clans, their metadata as well as promote and demote people in their rosters;
- Player Management - Manage players and their metadata, as well as their applications to clans;
- Applications - Khan handles the work involved with applying to clans, inviting people to clans, accepting, denying and kicking;
- Clan Search - Search a list of clans to present your player with relevant options;
- Top Clans - Choose from a specific dimension to return a list of the top clans in that specific range (SOON);
- Web Hooks - Need to integrate your clan system with another application? We got your back! Use our web hooks sytem and plug into whatever events you need;
- Auditing Trail - Track every action coming from your games (SOON);
- New Relic Support - Natively support new relic with segments in each API route for easy detection of bottlenecks;
- Easy to deploy - Khan comes with containers already exported to docker hub for every single of our successful builds. Just pick your choice!
Read more about Khan in our comprehensive documentation.
Make sure you have go installed on your machine.
If you use homebrew you can install it with brew install go
.
Run make setup
.
Create the development database with make migrate
(first time only).
Run the api with make run
.
Provided you have docker installed, to build Khan's image run:
$ make build-docker
To run a new khan instance, run:
$ make run-docker
We already provide a docker-compose.yml as well with all dependencies configured for you to run. To run Khan and all its dependencies, run:
$ docker-compose up
Note If you are running it on MacOS, you will need to update the amount of RAM docker has access to. Docker, by default, can use 2GB of RAM, however, Khan uses an instance of ElasticSearch and it needs at least 2GB of RAM to work properly. So, if you are experiencing problems while connecting to the elastic search, this might be the root cause of the problem.
Running tests can be done with make test
, while creating the test database can be accomplished with make drop-test
and make db-test
.
Running benchmarks can be done with make ci-perf
.
Getting coverage data can be achieved with make coverage
, while reading the actual results can be done with make coverage-html
.
Khan goes through some static analysis tools for go. To run them just use make static
.
Right now, gocyclo can't process the vendor folder, so we just ignore the exit code for it, while maintaining the output for anything not in the vendor folder.
If you have found a security vulnerability, please email security@tfgco.com