Skip to main content

txtx_core/std/
mod.rs

1use txtx_addon_kit::{
2    types::{
3        commands::PreCommandSpecification, functions::FunctionSpecification,
4        signers::SignerSpecification,
5    },
6    Addon,
7};
8
9use crate::constants::NAMESPACE;
10
11use self::{commands::actions::ACTIONS, functions::FUNCTIONS};
12
13pub mod commands;
14pub mod functions;
15pub mod signers;
16pub mod typing;
17
18#[derive(Debug)]
19pub struct StdAddon;
20
21impl StdAddon {
22    pub fn new() -> Self {
23        Self {}
24    }
25}
26
27impl Addon for StdAddon {
28    fn get_name(&self) -> &str {
29        "Standard Library"
30    }
31
32    fn get_description(&self) -> &str {
33        txtx_addon_kit::indoc! {r#"
34      `txtx` standard commands and functions provide base functionality that can be used to build Runbooks.
35      "#}
36    }
37
38    fn get_namespace(&self) -> &str {
39        NAMESPACE
40    }
41
42    fn get_functions(&self) -> Vec<FunctionSpecification> {
43        FUNCTIONS.clone()
44    }
45
46    fn get_actions(&self) -> Vec<PreCommandSpecification> {
47        ACTIONS.clone()
48    }
49
50    fn get_signers(&self) -> Vec<SignerSpecification> {
51        vec![]
52    }
53}