mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 15:17:57 +01:00
22 lines
550 B
Rust
22 lines
550 B
Rust
use crate::authorization::permissions::Permission;
|
|
use api::main_capnp::session::Owned as CPSession;
|
|
use api::auth_capnp::response::successful::Builder;
|
|
use crate::capnp::resources::Machines;
|
|
|
|
use crate::session::SessionHandle;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct APISession;
|
|
|
|
impl APISession {
|
|
pub fn new() -> Self {
|
|
Self
|
|
}
|
|
|
|
pub fn build(session: SessionHandle, builder: Builder<CPSession>) {
|
|
let mut builder = builder.init_session();
|
|
|
|
builder.set_resources(capnp_rpc::new_client(Machines::new(session)))
|
|
}
|
|
}
|