Epirank

command module
v0.0.0-...-91e90d9 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: MIT Imports: 9 Imported by: 0

README

Epirank 🏆

Epirank is a program that retrieves all students and their GPAs from EPITECH and makes them available by web & JSON.

The first time you will start the server, it will update the datase and then will update it every day around 3am.

Project

The webservice runs using :

  • Gin framework and listen on the port 8080.
  • Go-sqlite3 as a SQLite driver.
  • Logrus for logging.

Endpoint

There is only one route :

  • GET / : It can take some parameters in the query.
Parameter Description Optional
city The city we want (STG, ...). If parameter is not present we ask for every city.
promotion The promotion we want (tek1, tek2, ...)
format We can ask JSON. If not present, returns the HTML ranking page

Authentication file

{
	"login": "email",
	"password": "password"
}

If you want to delete the configuration file after the launch, set the environment variable :

If you are using Fish shell:

set -gx EPIRANK_DELETE_CREDENTIALS true

Run from sources

go build
./Epirank

Run with Docker 🐳

Build the Docker image from the sources
docker build -t epirank .
Pull image from Docker Hub

TODO

Docker run
  • The database which is storing all students data is in /tmp. The authentication file too.
  • EPIRANK_DELETE_CREDENTIALS : if set at true, deletes the authentication file
  • GIN_MODE [debug/release]
docker run -d --name epirank
	-v "~/epirank_data":/tmp
	-e EPIRANK_DELETE_CREDENTIALS=true
	-e GIN_MODE=release
	epirank

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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