MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / auth_json_path

Function auth_json_path

crates/opencode-config/src/wellknown.rs:46–51  ·  view source on GitHub ↗

Returns the path to `auth.json` inside the opencode data directory.

()

Source from the content-addressed store, hash-verified

44static CACHE: Mutex<Option<HashMap<String, CacheEntry>>> = Mutex::new(None);
45/// Returns the path to `auth.json` inside the opencode data directory.
46fn auth_json_path() -> PathBuf {
47 let data_dir = dirs::data_dir()
48 .unwrap_or_else(|| PathBuf::from("~/.local/share"))
49 .join("opencode");
50 data_dir.join("auth.json")
51}
52
53/// Reads `auth.json` and returns only the wellknown entries (url -> WellKnownAuth).
54fn read_wellknown_entries() -> HashMap<String, WellKnownAuth> {

Callers 1

read_wellknown_entriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected