config

package
v0.36.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 8 Imported by: 0

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

func GetPreferredOutboundIP() (net.IP, error)

GetPreferredOutboundIP gets preferred outbound IP of this machine

func LoadEnvFile added in v0.31.0

func LoadEnvFile(filename string) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL