Documentation
¶
Overview ¶
Package config resolves where the CLI talks to and which workspace it acts in. Precedence is explicit: flag, then environment, then default (CLT-15/FR-25).
Index ¶
Constants ¶
const ( EnvToken = "WANIIS_TOKEN" EnvAPIURL = "WANIIS_API_URL" EnvWorkspace = "WANIIS_WORKSPACE" EnvConfigDir = "WANIIS_CONFIG_DIR" EnvNoColor = "NO_COLOR" )
Environment variable names read by the CLI. They read "Waniis" because people type them.
const DefaultAPIURL = "https://app.waniis.com"
DefaultAPIURL is the product's single origin for the web app and the API.
Variables ¶
This section is empty.
Functions ¶
func AppURL ¶
AppURL is the web app's origin for a given API base: the API alias maps to the app host so that links people open in a browser always land on the web app.
func Dir ¶
Dir is the directory for the CLI's own files: $WANIIS_CONFIG_DIR, else $XDG_CONFIG_HOME/waniis, else ~/.config/waniis (%AppData%\waniis on Windows).
func NormalizeBaseURL ¶
NormalizeBaseURL validates an API base URL. It must be https, except for localhost, so a token is never sent in clear text to another host (CLT-15, Security). Trailing slashes are dropped.
Types ¶
This section is empty.