MCPcopy Create free account
hub / github.com/clockwork-xyz/clockwork / parse_webhook_command

Function parse_webhook_command

cli/src/parser.rs:243–258  ·  view source on GitHub ↗
(matches: &ArgMatches)

Source from the content-addressed store, hash-verified

241}
242
243fn parse_webhook_command(matches: &ArgMatches) -> Result<CliCommand, CliError> {
244 match matches.subcommand() {
245 Some(("get", matches)) => Ok(CliCommand::WebhookGet {
246 id: parse_string("id", matches)?.into_bytes(),
247 }),
248 Some(("create", matches)) => Ok(CliCommand::WebhookCreate {
249 body: parse_string("body", matches)?.into_bytes(),
250 id: parse_string("id", matches)?.into_bytes(),
251 method: parse_http_method("method", matches)?,
252 url: parse_string("url", matches)?,
253 }),
254 _ => Err(CliError::CommandNotRecognized(
255 matches.subcommand().unwrap().0.into(),
256 )),
257 }
258}
259
260fn parse_worker_command(matches: &ArgMatches) -> Result<CliCommand, CliError> {
261 match matches.subcommand() {

Callers 1

try_fromMethod · 0.85

Calls 2

parse_stringFunction · 0.85
parse_http_methodFunction · 0.85

Tested by

no test coverage detected