package variables

const (
	Version = "0.1.5-dev"

	SessionName = "Session_Data_House"

	sensorMacRegex = ":sensor([0-9A-Fa-f:]+)"

	logFile     = "file"
	LogFileName = "filename"
	LogFilePath = "datahouse.log"
	logConsole  = "console"
)

var (
/*
————————————————————————————————————————————————————————————————————————————————
												        Routes
————————————————————————————————————————————————————————————————————————————————
*/
	RootRoute          = "/"

	AddTempRoute       = "/add/temp/" + sensorMacRegex + "/:val([0-9]+)"
	AddRelayRoute      = "/add/relay/" + sensorMacRegex
	TeleinfoAddRoute   = "/teleinfo/add"
	AddSoilMoistRoute  = "/add/soil" /* Route for soil moisture sensors*/

	ViewTempRoute      = "/view/temp"
	ViewRelaysRoute    = "/view/relay"
	ViewRelayRoute     = "/view/relay/" + sensorMacRegex
	ViewTeleinfosRoute = "/view/teleinfo"
	ViewTeleinfoRoute  = "/view/teleinfo/:compteur([0-9A-Fa-f:]+)"
	ViewLogRoute       = "/view/log"
	WebSocketLogRoute  = "/view/log/join"

	CommandRelayRoute  = "/command/relay/" + sensorMacRegex

	SensorsRoute       = "/sensors"
	LoginRoute         = "/login/:route(.*)"
	LoginRouteNoRegex  = "/login"
	UserRoute          = "/user"


	/*
	————————————————————————————————————————————————————————————————————————————————
													         Logs
	————————————————————————————————————————————————————————————————————————————————
	*/
	LogType = logFile
	LogParams = "{\""+LogFileName+"\":\""+LogFilePath+"\"}"
)
