Files
GoSally/core/config/consts.go
alex d442871950 Refactor configuration and update handling:
- Modify .luarc.json to include global Lua scripts.
- Update Makefile to include LDFLAGS for versioning.
- Enhance node.go to implement version checking and update handling.
- Refactor Lua global variables in _globals.lua and echo.lua to use new structures.
- Remove deprecated http.lua and update config.yaml for TLS and update settings.
- Introduce new update.go for version management and update checking.
- Add tests for version comparison in update_test.go.
- Improve error handling in various server methods.
2025-07-03 22:38:05 +03:00

30 lines
883 B
Go

package config
var UUIDLength int = 4
var ApiRoute string = "/api/{ver}"
var ComDirRoute string = "/com"
var NodeVersion string
var ActualFileNanme string = "actual.txt"
type _internalConsts struct{}
type _serverConsts struct{}
type _updateConsts struct{}
func GetUpdateConsts() _updateConsts { return _updateConsts{} }
func (_ _updateConsts) GetNodeVersion() string {
if NodeVersion == "" {
return "version0.0.0-none"
}
return NodeVersion
}
func (_ _updateConsts) GetActualFileName() string { return ActualFileNanme }
func GetInternalConsts() _internalConsts { return _internalConsts{} }
func (_ _internalConsts) GetUUIDLength() int { return UUIDLength }
func GetServerConsts() _serverConsts { return _serverConsts{} }
func (_ _serverConsts) GetApiRoute() string { return ApiRoute }
func (_ _serverConsts) GetComDirRoute() string { return ComDirRoute }