Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominion5254 committed Oct 11, 2024
1 parent af682d5 commit a1ffc32
Show file tree
Hide file tree
Showing 23 changed files with 156 additions and 152 deletions.
4 changes: 2 additions & 2 deletions core/startos/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pub fn action_api<C: Context>() -> ParentHandler<C> {
"get-input",
from_fn_async(get_action_input)
.with_display_serializable()
.with_about("Get action input spec")
.with_call_remote::<CliContext>()
.with_about("Get action input spec"),
)
.subcommand(
"run",
Expand All @@ -35,8 +35,8 @@ pub fn action_api<C: Context>() -> ParentHandler<C> {
}
Ok(())
})
.with_about("Run service action")
.with_call_remote::<CliContext>()
.with_about("Run service action"),
)
}

Expand Down
16 changes: 8 additions & 8 deletions core/startos/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ pub fn auth<C: Context>() -> ParentHandler<C> {
from_fn_async(logout)
.with_metadata("get_session", Value::Bool(true))
.no_display()
.with_call_remote::<CliContext>()
.with_about("Log out of StartOS server"),
.with_about("Log out of StartOS server")
.with_call_remote::<CliContext>(),
)
.subcommand(
"session",
Expand All @@ -124,8 +124,8 @@ pub fn auth<C: Context>() -> ParentHandler<C> {
from_fn_async(get_pubkey)
.with_metadata("authenticated", Value::Bool(false))
.no_display()
.with_call_remote::<CliContext>()
.with_about("Get public key derived from server private key"),
.with_about("Get public key derived from server private key")
.with_call_remote::<CliContext>(),
)
}

Expand Down Expand Up @@ -302,15 +302,15 @@ pub fn session<C: Context>() -> ParentHandler<C> {
.with_custom_display_fn(|handle, result| {
Ok(display_sessions(handle.params, result))
})
.with_call_remote::<CliContext>()
.with_about("Display all server sessions"),
.with_about("Display all server sessions")
.with_call_remote::<CliContext>(),
)
.subcommand(
"kill",
from_fn_async(kill)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Terminate existing server session(s)"),
.with_about("Terminate existing server session(s)")
.with_call_remote::<CliContext>(),
)
}

Expand Down
12 changes: 8 additions & 4 deletions core/startos/src/backup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,22 @@ pub fn backup<C: Context>() -> ParentHandler<C> {
"create",
from_fn_async(backup_bulk::backup_all)
.no_display()
.with_call_remote::<CliContext>().with_about("Create backup for all packages"),
.with_call_remote::<CliContext>()
.with_about("Create backup for all packages"),
)
.subcommand(
"target",
target::target::<C>().with_about("Commands related to a backup target"),
)
.subcommand("target", target::target::<C>().with_about("Commands related to a backup target"))
}

pub fn package_backup<C: Context>() -> ParentHandler<C> {
ParentHandler::new().subcommand(
"restore",
from_fn_async(restore::restore_packages_rpc)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Restore package(s) from backup"),
.with_about("Restore package(s) from backup")
.with_call_remote::<CliContext>(),
)
}

Expand Down
12 changes: 6 additions & 6 deletions core/startos/src/backup/target/cifs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ pub fn cifs<C: Context>() -> ParentHandler<C> {
"add",
from_fn_async(add)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Add a new backup target"),
.with_about("Add a new backup target")
.with_call_remote::<CliContext>(),
)
.subcommand(
"update",
from_fn_async(update)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Update an existing backup target"),
.with_about("Update an existing backup target")
.with_call_remote::<CliContext>(),
)
.subcommand(
"remove",
from_fn_async(remove)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Remove an existing backup target"),
.with_about("Remove an existing backup target")
.with_call_remote::<CliContext>(),
)
}

Expand Down
16 changes: 8 additions & 8 deletions core/startos/src/backup/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ pub fn target<C: Context>() -> ParentHandler<C> {
"list",
from_fn_async(list)
.with_display_serializable()
.with_call_remote::<CliContext>()
.with_about("List existing backup targets"),
.with_about("List existing backup targets")
.with_call_remote::<CliContext>(),
)
.subcommand(
"info",
Expand All @@ -159,21 +159,21 @@ pub fn target<C: Context>() -> ParentHandler<C> {
.with_custom_display_fn::<CliContext, _>(|params, info| {
Ok(display_backup_info(params.params, info))
})
.with_call_remote::<CliContext>()
.with_about("Display package backup information"),
.with_about("Display package backup information")
.with_call_remote::<CliContext>(),
)
.subcommand(
"mount",
from_fn_async(mount)
.with_call_remote::<CliContext>()
.with_about("Mount backup target"),
.with_about("Mount backup target")
.with_call_remote::<CliContext>(),
)
.subcommand(
"umount",
from_fn_async(umount)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Unmount backup target"),
.with_about("Unmount backup target")
.with_call_remote::<CliContext>(),
)
}

Expand Down
4 changes: 2 additions & 2 deletions core/startos/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ pub fn put<C: Context>() -> ParentHandler<C> {
"ui",
from_fn_async(ui)
.with_display_serializable()
.with_call_remote::<CliContext>()
.with_about("Store pointer and value in db"),
.with_about("Store pointer and value in db")
.with_call_remote::<CliContext>(),
)
}
#[derive(Deserialize, Serialize, Parser, TS)]
Expand Down
12 changes: 6 additions & 6 deletions core/startos/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pub fn diagnostic<C: Context>() -> ParentHandler<C> {
.subcommand(
"error",
from_fn(error)
.with_call_remote::<CliContext>()
.with_about("Display diagnostic error"),
.with_about("Display diagnostic error")
.with_call_remote::<CliContext>(),
)
.subcommand(
"logs",
Expand All @@ -43,8 +43,8 @@ pub fn diagnostic<C: Context>() -> ParentHandler<C> {
"restart",
from_fn(restart)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Restart the server"),
.with_about("Restart the server")
.with_call_remote::<CliContext>(),
)
.subcommand(
"disk",
Expand All @@ -54,8 +54,8 @@ pub fn diagnostic<C: Context>() -> ParentHandler<C> {
"rebuild",
from_fn_async(rebuild)
.no_display()
.with_call_remote::<CliContext>()
.with_about("Teardown and rebuild service containers"),
.with_about("Teardown and rebuild service containers")
.with_call_remote::<CliContext>(),
)
}

Expand Down
4 changes: 2 additions & 2 deletions core/startos/src/disk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ pub fn disk<C: Context>() -> ParentHandler<C> {
.with_custom_display_fn(|handle, result| {
Ok(display_disk_info(handle.params, result))
})
.with_call_remote::<CliContext>()
.with_about("List disk info"),
.with_about("List disk info")
.with_call_remote::<CliContext>(),
)
.subcommand("repair", from_fn_async(|_: C| repair()).no_cli())
.subcommand(
Expand Down
Loading

0 comments on commit a1ffc32

Please sign in to comment.