pub struct SecretValue {
pub value: Vec<i32>,
}Fields§
§value: Vec<i32>Implementations§
Source§impl SecretValue
impl SecretValue
Sourcepub fn new(value: Vec<i32>) -> Self
pub fn new(value: Vec<i32>) -> Self
Examples found in repository?
examples/secrets.rs (line 32)
6async fn main() -> Result<(), Box<dyn Error>> {
7 tracing_subscriber::registry()
8 .with(fmt::layer().with_writer(std::io::stdout))
9 .with(EnvFilter::new(
10 std::env::var("RUST_LOG").unwrap_or_else(|_| "info".into()),
11 ))
12 .init();
13 let api_token = std::env::var("FLY_ORG_TOKEN").expect("FLY_ORG_TOKEN must be set");
14 let args: Vec<String> = std::env::args().collect();
15 let org_slug = &args
16 .get(1)
17 .expect("Usage: cargo run --example apps <org_slug>");
18
19 let fly = FlyControl::new(api_token.to_string());
20
21 let app_name = "rusty-app";
22 fly.apps.create(app_name, org_slug).await?;
23
24 // SECRETS
25 let secret_label = "test_secret";
26 let secret_type = "secret";
27 fly.secrets
28 .create_secret(
29 app_name,
30 secret_label,
31 secret_type,
32 secrets::SecretValue::new(vec![123]),
33 )
34 .await?;
35 fly.secrets.list_secrets(app_name).await?;
36 fly.secrets.destroy_secret(app_name, secret_label).await?;
37
38 fly.apps.delete(app_name, false).await?;
39
40 Ok(())
41}Trait Implementations§
Source§impl Debug for SecretValue
impl Debug for SecretValue
Auto Trait Implementations§
impl Freeze for SecretValue
impl RefUnwindSafe for SecretValue
impl Send for SecretValue
impl Sync for SecretValue
impl Unpin for SecretValue
impl UnwindSafe for SecretValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more