Augusto Dwenger
461f4b4c94
Add required flag for the token
...
The default flag parsing engine from go was replaced by the the package
github.com/gessevdk/go-flags. It provides more options to parse flags
from the program args and from env vars.
2020-11-11 11:01:13 +01:00
Augusto Dwenger
4eafabc465
Add more fields to the Stats struct
...
Add json serialization information
Add one complete data example to the db init script
2020-11-06 09:33:08 +01:00
Augusto Dwenger
b07ffc5f7e
Impement auth middleware
...
The middleware checks for the presents of a 'Token' header and
if the provided token is valid. It adds a authorization layer with
some basic configuration options.
2020-10-30 12:18:26 +01:00
Augusto Dwenger
2ae33c6e1b
Add default middlewares
...
Add request logging middleware
Add panic recover middleware
2020-10-30 11:31:57 +01:00
Augusto Dwenger
f61cd0ad83
Set verbose log level to trace
2020-10-30 10:32:11 +01:00
Augusto Dwenger
d6158dbe37
Add timeout for idle connections
2020-10-27 12:07:30 +01:00
Augusto Dwenger
7f817e166f
Implement logrus for logging
...
Fix wrong error handling if host was not found getting the stats for it.
Add configuration flags to configure the logging.
2020-10-18 19:01:40 +02:00
Augusto Dwenger
092739985c
Implement flag to change the http port
2020-10-18 16:40:34 +02:00
Augusto Dwenger
44897b3b5a
Implement the hosts controller
...
Simple interaction with the db like getting some data and inserting
new data points into it.
2020-10-18 15:38:57 +02:00
Augusto Dwenger
cc663128f4
Implement in memory db for development
2020-10-16 17:38:30 +02:00