|
|
|
@ -3,6 +3,7 @@ package main
|
|
|
|
|
// Config of the program.
|
|
|
|
|
type Config struct {
|
|
|
|
|
Logging
|
|
|
|
|
Server
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Logging configuration.
|
|
|
|
@ -15,10 +16,26 @@ type Logging struct {
|
|
|
|
|
Interval int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Server configuration.
|
|
|
|
|
type Server struct {
|
|
|
|
|
|
|
|
|
|
// PortHTTP is port where HTTP server must listen.
|
|
|
|
|
// If 0, HTTP is disabled.
|
|
|
|
|
PortHTTP int
|
|
|
|
|
|
|
|
|
|
// PortHTTP is port where the HTTPS server must listen.
|
|
|
|
|
// If 0, HTTPS is disabled.
|
|
|
|
|
PortHTTPS int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Conf contains the current configuration.
|
|
|
|
|
var Conf = Config{
|
|
|
|
|
Logging{
|
|
|
|
|
AccessLog: "/wttr.in/log/access.log",
|
|
|
|
|
Interval: 300,
|
|
|
|
|
},
|
|
|
|
|
Server{
|
|
|
|
|
PortHTTP: 8083,
|
|
|
|
|
PortHTTPS: 0,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|