add cli to rotate key (#2525)

* rotate key

* handle service with no config
This commit is contained in:
Aiden McClelland
2023-11-17 16:27:08 -07:00
committed by GitHub
parent d03aadb367
commit 8f231424d1
8 changed files with 165 additions and 9 deletions

View File

@@ -1,11 +1,18 @@
use std::path::Path;
use std::str::FromStr;
use serde::{Deserialize, Deserializer, Serialize};
use crate::Id;
use crate::{Id, InvalidId};
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize)]
pub struct InterfaceId(Id);
impl FromStr for InterfaceId {
type Err = InvalidId;
fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok(Self(Id::try_from(s.to_owned())?))
}
}
impl From<Id> for InterfaceId {
fn from(id: Id) -> Self {
Self(id)