MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / lookup

Function lookup

crates/openshell-server/src/auth/method_authz.rs:61–68  ·  view source on GitHub ↗
(method: &str)

Source from the content-addressed store, hash-verified

59/// Find the auth metadata for `method`, if any.
60#[must_use]
61pub fn lookup(method: &str) -> Option<&'static MethodAuth> {
62 for table in SERVICES {
63 if let Some(entry) = table.iter().find(|m| m.path == method) {
64 return Some(entry);
65 }
66 }
67 None
68}
69
70/// All registered RPC paths across every service. Used by tests.
71#[cfg(test)]

Callers 4

required_scopeFunction · 0.85
required_roleFunction · 0.85
is_user_callableFunction · 0.85

Calls

no outgoing calls

Tested by 1