MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / read_all

Function read_all

crates/opencode-mcp/src/auth.rs:60–66  ·  view source on GitHub ↗

Read the entire auth store from disk.

()

Source from the content-addressed store, hash-verified

58
59/// Read the entire auth store from disk.
60async fn read_all() -> HashMap<String, AuthEntry> {
61 let path = auth_file_path();
62 match fs::read_to_string(&path).await {
63 Ok(contents) => serde_json::from_str(&contents).unwrap_or_default(),
64 Err(_) => HashMap::new(),
65 }
66}
67
68/// Write the entire auth store to disk (creates parent dirs as needed).
69async fn write_all(data: &HashMap<String, AuthEntry>) -> Result<(), std::io::Error> {

Callers 3

getFunction · 0.85
setFunction · 0.85
removeFunction · 0.85

Calls 2

auth_file_pathFunction · 0.85
newFunction · 0.85

Tested by

no test coverage detected