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

Function validate_endpoint_name

crates/openshell-server/src/grpc/service.rs:227–232  ·  view source on GitHub ↗
(field: &str, value: &str, max_len: usize)

Source from the content-addressed store, hash-verified

225
226#[allow(clippy::result_large_err)]
227fn validate_endpoint_name(field: &str, value: &str, max_len: usize) -> Result<(), Status> {
228 if value.is_empty() {
229 return Err(Status::invalid_argument(format!("{field} is required")));
230 }
231 validate_non_empty_endpoint_name(field, value, max_len)
232}
233
234#[allow(clippy::result_large_err)]
235fn validate_optional_endpoint_name(field: &str, value: &str, max_len: usize) -> Result<(), Status> {

Callers 5

handle_expose_serviceFunction · 0.85
handle_get_serviceFunction · 0.85
handle_list_servicesFunction · 0.85
handle_delete_serviceFunction · 0.85

Calls 2

is_emptyMethod · 0.45

Tested by 1