})().with_context(|| format!("read {} {:?}", P::S::WHAT, &filename))?
}
+macro_rules! ordinary_subcmd {
+ {$arg:expr, $help:expr $(,)?} => {
+ inventory::submit!{Subcommand(
+ $arg,
+ $help,
+ call,
+ )}
+ }
+}
+
//---------- list-games ----------
mod list_games {
Ok(())
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"list-games",
"List games",
- call,
- )}
+ }
}
// todo: list-players
Ok(())
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"reset",
"Reset the state of the game table",
- call,
- )}
+ }
}
//---------- set-link ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"set-link",
"Set one of the info links visible from within the game",
- call,
- )}
+ }
}
//---------- join-game ----------
Ok(())
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"join-game",
"Join a game or reset access token (creating or updating account)",
- call,
- )}
+ }
}
//---------- leave-game ----------
Ok(())
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"leave-game",
"Leave a game",
- call,
- )}
+ }
}
//---------- delete-game ----------
Ok(())
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"delete-game",
"Delete a game (throwing all the players out of it)",
- call,
- )}
+ }
}
//---------- library-list ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"library-list",
"List pieces in the shape libraries",
- call,
- )}
+ }
}
//---------- library-sdd ----------
exit(exitcode);
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"library-add",
"Add pieces from the shape libraries",
- call,
- )}
+ }
}
//---------- list-pieces ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"list-pieces",
"List pieces in the game",
- call,
- )}
+ }
}
//---------- adhoc json/ron etc. ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"command-json",
"run ad-hoc management command(s) (JSON)",
- call,
- )}
- inventory::submit!{Subcommand(
+ }
+ ordinary_subcmd!{
"command-ron",
"run ad-hoc management command(s) (Rusty Object Notation)",
- call,
- )}
+ }
}
//---------- alter game ----------
Ok(())
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"alter-game-json",
"run an ad-hoc AlterGame command (JSON)",
- call,
- )}
- inventory::submit!{Subcommand(
+ }
+ ordinary_subcmd!{
"alter-game-ron",
"run an ad-hoc AlterGame command (Rusty Object Notation)",
- call,
- )}
+ }
}
//---------- upload-bundle ----------
writeln!(out, "{}", bundle)?;
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"upload-bundle",
"Upload a bundle",
- call,
- )}
+ }
}
//---------- list-bundles ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"list-bundles",
"List bundles",
- call,
- )}
+ }
}
//---------- download-bundle ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"download-bundle",
"download bundle",
- call,
- )}
+ }
}
//---------- clear game ----------
clear_game(&ma, &mut chan)?;
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"clear-game",
"clear the table and clear out all bundles",
- call,
- )}
+ }
}
//---------- list-accounts ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"list-accounts",
"List accounts in your account scope",
- call,
- )}
+ }
}
//---------- mgmtchannel-proxy ----------
tresps.join().expect("collect responses copy");
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
SSH_PROXY_SUBCMD,
"connect to management channel and copy raw message data back and forth",
- call,
- )}
+ }
}
//---------- set-ssh-keys ----------
}
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"set-ssh-keys",
"set SSH keys for remote management access authentication",
- call,
- )}
+ }
}
//---------- list-ssh-keys ----------
out.flush()?;
}
- inventory::submit!{Subcommand(
+ ordinary_subcmd!{
"list-ssh-keys",
"set SSH keys for remote management access authentication",
- call,
- )}
+ }
}