Struct garage_model::helper::key::KeyHelper
source · pub struct KeyHelper<'a>(_);
Implementations§
source§impl<'a> KeyHelper<'a>
impl<'a> KeyHelper<'a>
sourcepub async fn get_internal_key(&self, key_id: &String) -> Result<Key, Error>
pub async fn get_internal_key(&self, key_id: &String) -> Result<Key, Error>
Returns a Key if it is present in key table, even if it is in deleted state. Querying a non-existing key ID returns an internal error.
sourcepub async fn get_existing_key(&self, key_id: &String) -> Result<Key, Error>
pub async fn get_existing_key(&self, key_id: &String) -> Result<Key, Error>
Returns a Key if it is present in key table, only if it is in non-deleted state. Querying a non-existing key ID or a deleted key returns a bad request error.