MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / cli

Function cli

crates/cli/src/subcommands/unlock.rs:7–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5use clap::{Arg, ArgMatches};
6
7pub fn cli() -> clap::Command {
8 clap::Command::new("unlock")
9 .about("Unlock a database to allow deletion")
10 .long_about(
11 "Unlock a database that was previously locked with `spacetime lock`.\n\n\
12 After unlocking, the database can be deleted normally with `spacetime delete`.",
13 )
14 .arg(
15 Arg::new("database")
16 .required(false)
17 .help("The name or identity of the database to unlock"),
18 )
19 .arg(common_args::server().help("The nickname, host name or URL of the server hosting the database"))
20 .arg(
21 Arg::new("no_config")
22 .long("no-config")
23 .action(clap::ArgAction::SetTrue)
24 .help("Ignore spacetime.json configuration"),
25 )
26 .after_help("Run `spacetime help unlock` for more detailed information.\n")
27}
28
29pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::Error> {
30 let server_from_cli = args.get_one::<String>("server").map(|s| s.as_ref());

Callers

nothing calls this directly

Calls 3

serverFunction · 0.85
requiredMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected