tangled-api 0.1.0

Lexicon-generated XRPC client for Tangled and AT Protocol APIs
Documentation
// @generated by `cargo xtask codegen` — do not edit.
// source: lexicons/repo/listSecrets.json (sh.tangled.repo.listSecrets)

#![allow(clippy::all)]

pub const NSID: &str = "sh.tangled.repo.listSecrets";

#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct Params {
    pub repo: String,
}

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Output {
    pub secrets: Vec<crate::lexicon::sh::tangled::repo::list_secrets::Secret>,
}

pub fn list_secrets(
    http: &reqwest::Client,
    base: &str,
    params: &Params,
) -> reqwest::RequestBuilder {
    let rb = http.get(crate::xrpc::xrpc_url(base, NSID));
    let rb = rb.header(reqwest::header::ACCEPT, "application/json");
    let rb = crate::xrpc::push_query(rb, params);
    rb
}

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Secret {
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "createdBy")]
    pub created_by: String,
    pub key: String,
    pub repo: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}