mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
More SDK comments (#2796)
* sdk tweaks * switch back to deeppartial * WIP, update comments * reinstall chesterton's fence * more comments * delete extra package.lock * handle TODOs --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -322,13 +322,25 @@ pub enum AllowedStatuses {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[model = "Model<Self>"]
|
||||
pub struct ActionMetadata {
|
||||
/// A human-readable name
|
||||
pub name: String,
|
||||
/// A detailed description of what the action will do
|
||||
pub description: String,
|
||||
/// Presents as an alert prior to executing the action. Should be used sparingly but important if the action could have harmful, unintended consequences
|
||||
pub warning: Option<String>,
|
||||
#[serde(default)]
|
||||
/// One of: "enabled", "hidden", or { disabled: "" }
|
||||
/// - "enabled" - the action is available be run
|
||||
/// - "hidden" - the action cannot be seen or run
|
||||
/// - { disabled: "example explanation" } means the action is visible but cannot be run. Replace "example explanation" with a reason why the action is disable to prevent user confusion.
|
||||
pub visibility: ActionVisibility,
|
||||
/// One of: "only-stopped", "only-running", "all"
|
||||
/// - "only-stopped" - the action can only be run when the service is stopped
|
||||
/// - "only-running" - the action can only be run when the service is running
|
||||
/// - "any" - the action can only be run regardless of the service's status
|
||||
pub allowed_statuses: AllowedStatuses,
|
||||
pub has_input: bool,
|
||||
/// If provided, this action will be nested under a header of this value, along with other actions of the same group
|
||||
pub group: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user