octocrab/models/repos/
secrets.rs

1use super::super::*;
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct RepositorySecret {
5    pub name: String,
6    pub created_at: DateTime<Utc>,
7    pub updated_at: DateTime<Utc>,
8}
9
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11#[non_exhaustive]
12pub struct RepositorySecrets {
13    pub total_count: i32,
14    pub secrets: Vec<RepositorySecret>,
15}
16
17#[derive(Debug, Clone, PartialEq, Serialize)]
18pub struct CreateRepositorySecret<'a> {
19    /// Value for your secret,
20    /// encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.
21    pub encrypted_value: &'a str,
22    /// ID of the key you used to encrypt the secret.
23    pub key_id: &'a str,
24}
25
26#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
27#[serde(rename_all = "snake_case")]
28pub enum CreateRepositorySecretResponse {
29    Created,
30    Updated,
31}