getting rid of diesel

This commit is contained in:
2023-12-19 22:17:00 +01:00
committed by Gabor Körber
parent 81586e2970
commit 7cee103035
8 changed files with 1834 additions and 70 deletions

8
src/auth/models.rs Normal file
View File

@@ -0,0 +1,8 @@
pub struct User {
pub id: i32,
pub username: String,
}
pub struct NewUser<'a> {
pub username: &'a str,
}

View File

@@ -1,5 +1,4 @@
pub mod admin;
pub mod schema;
pub mod auth;
pub mod service;
pub mod state;
pub mod users;

View File

@@ -1,8 +0,0 @@
// @generated automatically by Diesel CLI.
diesel::table! {
users (id) {
id -> Int4,
username -> Varchar,
}
}

View File

@@ -1,15 +0,0 @@
use diesel::prelude::*;
#[derive(Queryable, Selectable)]
#[diesel(table_name = crate::schema::users)]
#[diesel(check_for_backend(diesel::pg::Pg))]
pub struct User {
pub id: i32,
pub username: String,
}
#[derive(Insertable)]
#[diesel(table_name = crate::schema::users)]
pub struct NewUser<'a> {
pub username: &'a str,
}

View File

@@ -1,6 +0,0 @@
# Users
The most basic requirement of most services is authentication or identifying users.
This module should aim to provide that.