52 lines
1.1 KiB
Go
52 lines
1.1 KiB
Go
package globals
|
|
|
|
import (
|
|
"os"
|
|
"sync"
|
|
)
|
|
|
|
var LogFile *os.File
|
|
|
|
type Config struct {
|
|
// general
|
|
Timezone string `json:"timezone"`
|
|
LogFilePath string `json:"logFilePath"`
|
|
LogLevel string `json:"logLevel"`
|
|
LogLevelNumeric int
|
|
|
|
// latex
|
|
LatexEngine string `json:"latexEngine"`
|
|
LatexSourceFilePath string `json:"latexSourceFilePath"`
|
|
LatexOutputPath string `json:"latexOutputPath"`
|
|
|
|
// webserver
|
|
WebserverDomain string `json:"webserverDomain"`
|
|
WebserverPort string `json:"webserverPort"`
|
|
WebserverSecure bool `json:"webserverSecure"`
|
|
WebserverPortSecure string `json:"webserverPortSecure"`
|
|
CertificatePath string `json:"certificatePath"`
|
|
CertificateKeyPath string `json:"certificateKeyPath"`
|
|
TrustedProxies []string `json:"trustedProxies"`
|
|
}
|
|
var AppConfig Config
|
|
|
|
|
|
type LatexExecution struct {
|
|
ExecutionLock sync.Mutex
|
|
ExecutionState string
|
|
Timestamp string
|
|
TimestampRFC string
|
|
Output []byte
|
|
}
|
|
var LatexExec LatexExecution
|
|
|
|
type ClientInfo struct {
|
|
ClientIP string
|
|
RequestType string
|
|
RequestPath string
|
|
Proxy string
|
|
Proxied bool
|
|
ProxyTrusted bool
|
|
}
|
|
|