• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

endoze / nysm / 6317699376

26 Sep 2023 08:00PM UTC coverage: 91.463%. First build
6317699376

Pull #1

github

endoze
Add initial implementation of nysm

In order to make the crate functional, this commit adds an initial
implementation with an aws provider used. This will allow future
providers to be added by implementing the QuerySecrets trait for each
new provider.
Pull Request #1: Add initial implementation of nysm

82 of 82 new or added lines in 3 files covered. (100.0%)

75 of 82 relevant lines covered (91.46%)

1.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/error.rs
1
#![deny(missing_docs)]
2
#[derive(thiserror::Error, Debug)]
3
/// Enum to define all of the possible errors that can occur during normal
4
/// use of Nysm.
5
pub enum NysmError {
6
  /// Error occurs when attempting to parse data as Json fails.
7
  #[error("Unable to parse data as json")]
8
  SerdeJson(#[from] serde_json::Error),
9

10
  /// Error occurs when attempting to parse data as Text fails.
11
  #[error("Unable to parse data as yaml")]
12
  SerdeYaml(#[from] serde_yaml::Error),
13

14
  /// Error occurs when pretty printing the contents of a secret fails.
15
  #[error("Unable to pretty print data")]
16
  BatPrint(#[from] bat::error::Error),
17

18
  /// Error occurs when reading/writing a temporary file for secret
19
  /// editing fails.
20
  #[error("Unable to read/write file caused by: {}", .0)]
21
  IO(#[from] std::io::Error),
22

23
  /// Error occurs when retrieving a list of secrets from a provider fails.
24
  #[error("Unable to retrieve list of secrets from aws response")]
25
  AwsListSecretsNoList,
26

27
  /// Error occurs when a specific secret has no string value.
28
  #[error("Unable to retrieve string value from aws response")]
29
  AwsSecretValueNoValueString,
30

31
  /// Error occurs when updating a secret's string value fails
32
  #[error("Unable to update secret value")]
33
  AwsSecretValueUpdate,
34
}
35

36
impl PartialEq for NysmError {
×
37
  fn eq(&self, other: &Self) -> bool {
1✔
38
    std::mem::discriminant(self) == std::mem::discriminant(other)
1✔
39
  }
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc