api

module
v0.0.0-...-4515e61 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: AGPL-3.0

README

api

GitHub license Documentation Go Report Card

Banner

api is an API service for the Eisengrind RageMP RPG server. It provides scalability, stability and availability of important API functions to be called by the server and its clients and thus, reducing the load on the main game server.

Concepts

One of the most basic concept of this api is to move the read requests of a CRUD-model to the client. Other operations such as create, update and delete can be partially moved to the client. The main difficulty is that some actions (e.g. picking up an item) are limited to the game itself and thus there has to be a trusted authority (in this case the game server itself) to manage those requests (picking up item -> move to player inventory for example).

Another concept is the interoperability between services. This means that we want other players to be able to interact with our API to create services extending the virtual roleplaying world. In addition to that, we try our best to provide OAuth2-specific authentication for external service to enable contributors to be aple to interact with our API.

Scalability

Scalability has a big impact on the games performance - whether it is the server or the client. So we try the best we can to create non-monolithic applications. The main goal is to create redundant services which are able to keep up with growing player amounts. In addition to that, we run our services in a Kubernetes Cluster. Therefore, some of the microservices provided by this API use message queues to provide another layer of scalability.

Usage

Just deploy given docker containers in your k8s cluster. (list of Docker containers will be created in the future!)

Directories

Path Synopsis
cmd
pkg
api
apis/auth/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
apis/inventory/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
apis/role/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
apis/serviceaccount/key/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
apis/serviceaccount/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
apis/user/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
bcrypt
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
pubsub/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
rbac/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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