Start Auth Library
Auth will talk to pocketbase
This commit is contained in:
22
auth/src/server.rs
Normal file
22
auth/src/server.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use std::net::SocketAddr;
|
||||
use tarpc::context::Context;
|
||||
use crate::types::RealmAuth;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RealmAuthServer {
|
||||
pub socket: SocketAddr,
|
||||
}
|
||||
|
||||
impl RealmAuthServer {
|
||||
pub fn new(socket: SocketAddr) -> RealmAuthServer {
|
||||
RealmAuthServer {
|
||||
socket,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl RealmAuth for RealmAuthServer {
|
||||
async fn test(self, context: Context, name: String) -> String {
|
||||
format!("Hello {}", name)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user