mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 14:57:56 +01:00
23 lines
547 B
Rust
23 lines
547 B
Rust
use api::session::Builder;
|
|
use crate::capnp::resources::Resources;
|
|
use crate::capnp::users::Users;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct Session {
|
|
resources: Resources,
|
|
users: Users,
|
|
}
|
|
|
|
impl Session {
|
|
pub fn new() -> Self {
|
|
Session {
|
|
resources: Resources::new(),
|
|
users: Users::new(),
|
|
}
|
|
}
|
|
|
|
pub fn build(&self, builder: &mut Builder) {
|
|
builder.set_resources(capnp_rpc::new_client(self.resources.clone()));
|
|
builder.set_users(capnp_rpc::new_client(self.users.clone()));
|
|
}
|
|
} |