Documentation
¶
Index ¶
Constants ¶
const ( DefaultAuth = "https://auth.api.norcube.com" DefaultWebApp = "https://app.norcube.com" DefaultSnapDB = "https://snapdb.api.norcube.com/app/v1" DefaultLangsync = "https://langsync.api.norcube.com" DefaultDomainradar = "https://domainradar.api.norcube.com/app/v1" DefaultBilling = "https://billing.api.norcube.com/app/v1" DefaultPrompthub = "https://prompthub.api.norcube.com" )
Defaults applied when no config file exists yet. Override via env or flags.
These point at the production Norcube environment. To target a non-prod environment, pass --auth-url / --web-app on `norcube login` and the values are persisted to the user's config file, or set the NORCUBE_AUTH_URL / NORCUBE_WEB_APP / NORCUBE_*_URL env vars per command.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Auth is the base URL of the auth service (e.g. https://auth.api.norcube.com).
// This is the source of identity for the CLI; every per-service token
// is minted from a refresh token issued here.
Auth string `koanf:"auth"`
// WebApp is the base URL of the Norcube web app, used to open /cli-login during browser auth.
WebApp string `koanf:"web_app"`
// SnapDB / Langsync / Domainradar / Billing / Prompthub base URLs are optional overrides.
SnapDB string `koanf:"snapdb"`
Langsync string `koanf:"langsync"`
Domainradar string `koanf:"domainradar"`
Billing string `koanf:"billing"`
Prompthub string `koanf:"prompthub"`
User User `koanf:"user"`
ActiveOrg Organization `koanf:"active_org"`
}
Config is the on-disk user configuration. It deliberately holds only non-secret state — refresh and access tokens live in the OS keyring.
func (*Config) ResetServiceURLs ¶
func (c *Config) ResetServiceURLs()
ResetServiceURLs overwrites every per-service URL with the current defaults while leaving the auth API URL, web-app URL, user, and active-org alone. Used by `norcube config reset-urls` to refresh installs whose persisted values predate a default change.