use crate::source::secret::Secret; use diesel::{result::Error, *}; impl Secret { /// Initialize the Secrets from the DB. /// Warning: You should only call this once. pub fn init(conn: &mut PgConnection) -> Result { read_secrets(conn) } } fn read_secrets(conn: &mut PgConnection) -> Result { use crate::schema::secret::dsl::*; secret.first::(conn) }