ezidam/crates/apps/src/lib.rs

34 lines
631 B
Rust

mod database;
mod error;
mod get_valid;
use chrono::{DateTime, Utc};
use id::AppID;
use serde::Serialize;
pub use crate::error::Error;
pub use get_valid::Error as GetValidError;
#[derive(Serialize, Debug, Clone)]
pub struct App {
id: AppID,
created_at: DateTime<Utc>,
updated_at: DateTime<Utc>,
label: String,
redirect_uri: String,
secret: String,
is_confidential: bool,
is_archived: bool,
}
impl App {
pub fn id(&self) -> &AppID {
&self.id
}
pub fn label(&self) -> &str {
&self.label
}
pub fn redirect_uri(&self) -> &str {
&self.redirect_uri
}
}