diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..591d0c6 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,26 @@ +#[macro_use] +mod actix_ructe; + +mod error; +mod notification; +pub mod routes; +mod users; + +use sqlx::{Pool, Postgres}; + +type Result<T> = std::result::Result<T, crate::error::PinussyError>; + +#[derive(Clone)] +pub struct Pinussy { + pub db: Pool<Postgres>, +} + +#[derive(sqlx::Type)] +#[sqlx(type_name = "privacy", rename_all = "lowercase")] +pub enum Privacy { + Private, + Unlisted, + Public, +} + +include!(concat!(env!("OUT_DIR"), "/templates.rs")); |