Documentation
¶
Overview ¶
Package envvar reads typed configuration overrides from environment variables. sqi-server (internal/config) and sqi-worker (internal/worker/config) both overlay their settings through it, so the two binaries accept the same spellings and report a malformed variable in the same words.
It exists as a leaf because internal/config pulls internal/auth/oidc, so the worker binary can never import it. This package imports nothing internal.
Every setter treats an unset or empty variable as a no-op, so the lower config layer survives. The typed setters trim surrounding whitespace and return an error naming the variable and its value when it does not parse, never a silent fallback.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool sets dst from a boolean variable spelled as ParseBool accepts. A malformed security-relevant flag such as SQI_AUTH_ENABLED=enabled is therefore an error rather than silently false.
func ParseBool ¶
ParseBool reads 1/true/yes/on as true and 0/false/no/off as false, in any case. ok is false for anything else, including surrounding whitespace.
func StringSlice ¶
StringSlice sets dst from a comma-separated variable, trimming spaces and dropping empty entries. A variable holding only commas and blanks is a no-op like an unset one, so it cannot wipe a list the config file set.
Types ¶
This section is empty.