Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger *slog.Logger
Logger is global since we will need it everywhere
Functions ¶
func GetPreferredOutboundIP ¶
GetPreferredOutboundIP gets preferred outbound IP of this machine
func LoadEnvFile ¶ added in v0.31.0
LoadEnvFile loads environment variables from a file (silently ignores if not found)
Types ¶
type FrontEndConfig ¶
type FrontEndConfig struct {
NewDocumentNumber int
ServerAPIURL string
FrontendPort string
FrontendAddr string
}
FrontEndConfig stores all of the frontend settings
func SetupFrontend ¶
func SetupFrontend() (FrontEndConfig, *slog.Logger)
SetupFrontend loads configuration for frontend-only server
type ServerConfig ¶
type ServerConfig struct {
ID int
ListenAddrIP string
ListenAddrPort string
DatabaseType string
DatabaseHost string
DatabasePort string
DatabaseUser string
DatabasePassword string
DatabaseDbname string
DatabaseSslmode string
IngressPath string
IngressDelete bool
IngressMoveFolder string
IngressPreserve bool
UseSidecarTxt bool
DocumentPath string
NewDocumentFolder string //absolute path to new document folder
NewDocumentFolderRel string //relative path to new document folder
WebUIPass bool
ClientUsername string
ClientPassword string
PushBulletToken string `json:"-"`
TesseractPath string
UseReverseProxy bool
BaseURL string
IngressInterval int
FrontEndConfig
}
ServerConfig contains all of the server settings
func SetupServer ¶
func SetupServer() (ServerConfig, *slog.Logger)
SetupServer loads configuration and returns ServerConfig and Logger
Click to show internal directories.
Click to hide internal directories.