Documentation
¶
Index ¶
- func GenerateStableUUID(macAddress, hostname string) string
- func GenerateToken() string
- func GetConfigPath() (string, error)
- func GetDataPath() (string, error)
- func GetLogFilePath(now time.Time) (string, error)
- func GetLogsPath() (string, error)
- func GetPort() int
- func GetSSDPPort() int
- func GetSystemUUID(biosUUID, macAddress, hostname string) string
- func GetTokenFilePath() (string, error)
- func GetUUIDFilePath() (string, error)
- func IsDefaultUUID(uuidStr string) bool
- func IsRunningFromRealBinary() bool
- func LoadOrGenerateUUID(macAddress, hostname string) (string, error)
- func LoadToken() (string, error)
- func SaveToken(token string) error
- func SaveUUID(uuidStr string) error
- func SetHideWindow(cmd *exec.Cmd)
- func ValidateCommand(id, name, command, workingDir string, arguments []string) error
- func ValidateMediaDirectory(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateStableUUID ¶
GenerateStableUUID creates a stable UUID based on system characteristics This ensures the same UUID is generated for the same system even if not persisted
func GenerateToken ¶
func GenerateToken() string
func GetConfigPath ¶
GetConfigPath returns the path to the config directory
func GetDataPath ¶
GetDataPath returns the path to the data directory
func GetLogFilePath ¶
GetLogFilePath returns the path to the daily log file.
func GetLogsPath ¶
GetLogsPath returns the path to the logs directory.
func GetPort ¶
func GetPort() int
GetPort returns the port from environment variable, defaulting to 9170
func GetSSDPPort ¶
func GetSSDPPort() int
GetSSDPPort returns the SSDP port from environment variable, defaulting to 1900
func GetSystemUUID ¶
GetSystemUUID gets the system UUID, using fallback logic for problematic default UUIDs biosUUID: The UUID read from BIOS/system macAddress: The system's MAC address (used for generating stable fallback) hostname: The system's hostname (used for generating stable fallback)
func GetTokenFilePath ¶
GetTokenFilePath returns the path to the token file
func GetUUIDFilePath ¶
GetUUIDFilePath returns the path to the generated UUID file
func IsDefaultUUID ¶
IsDefaultUUID checks if the given UUID is a known problematic default value
func IsRunningFromRealBinary ¶
func IsRunningFromRealBinary() bool
IsRunningFromRealBinary checks if the application is running from a real binary rather than from go run or wgo run
func LoadOrGenerateUUID ¶
LoadOrGenerateUUID loads a previously generated UUID from file, or generates a new one Uses atomic file creation to prevent race conditions when multiple processes start simultaneously
func SetHideWindow ¶
func ValidateCommand ¶
ValidateCommand validates a command definition
func ValidateMediaDirectory ¶
ValidateMediaDirectory validates a single media directory path
Types ¶
This section is empty.