summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
blob: 591d0c6e05be0eba587d259942e1dd0b6b705c37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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"));