Documentation
¶
Index ¶
Constants ¶
const DefaultAPIURL = "https://us1.oodle.ai"
DefaultAPIURL is the default Oodle API URL.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the path to the configuration file. The path can be overridden by the OODLE_CONFIG environment variable.
func ResolveAPIURL ¶ added in v0.6.0
func ResolveAPIURL() string
ResolveAPIURL returns the Oodle API URL from environment variables (OODLE_DEPLOYMENT > OODLE_API_URL > OODLE_URL) or the default URL. The precedence matches LoadConfig: OODLE_DEPLOYMENT wins over OODLE_API_URL, which wins over OODLE_URL. This is useful for commands that need an API URL without full config resolution (e.g. unauthenticated endpoints).
Types ¶
type Config ¶
type Config struct {
APIKey string `yaml:"api_key,omitempty"`
OAuthAccessToken string `yaml:"oauth_access_token,omitempty"`
OAuthRefreshToken string `yaml:"oauth_refresh_token,omitempty"`
OAuthTokenExpiry string `yaml:"oauth_token_expiry,omitempty"`
OAuthClientID string `yaml:"oauth_client_id,omitempty"`
OAuthAuthServer string `yaml:"oauth_auth_server,omitempty"`
Instance string `yaml:"instance"`
APIURL string `yaml:"api_url"`
}
Config holds the resolved Oodle CLI configuration.
func LoadConfig ¶
LoadConfig resolves configuration with the precedence:
CLI flags > env vars > config file > defaults.
Empty strings in flag arguments are treated as "not set".
func (*Config) OAuthExpiryTime ¶ added in v0.5.0
OAuthExpiryTime parses OAuthTokenExpiry when set.