mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 14:57:56 +01:00
Make compile
This commit is contained in:
parent
453111f0e4
commit
f6f0f14081
@ -5,9 +5,6 @@ use slog::Logger;
|
||||
|
||||
use casbin::prelude::*;
|
||||
|
||||
use futures_signals::signal::Mutable;
|
||||
|
||||
use crate::api::api;
|
||||
use crate::config::Config;
|
||||
use crate::auth::Authentication;
|
||||
use crate::error::Result;
|
||||
@ -58,10 +55,6 @@ impl Permissions {
|
||||
}
|
||||
}
|
||||
|
||||
impl api::permissions::Server for Permissions {
|
||||
|
||||
}
|
||||
|
||||
/// This line documents init
|
||||
pub async fn init(log: Logger, config: &Config) -> std::result::Result<PermissionsProvider, Box<dyn std::error::Error>> {
|
||||
let model = Model::from_file(config.access.model.clone()).await?;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// module needs to be top level for generated functions to be in scope:
|
||||
// https://github.com/capnproto/capnproto-rust/issues/16
|
||||
pub mod api {
|
||||
pub mod gen {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/api_capnp.rs"));
|
||||
}
|
||||
|
||||
@ -30,8 +30,6 @@ use capnp_rpc::rpc_twoparty_capnp::Side;
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
use api::diflouroborane;
|
||||
|
||||
pub async fn handle_connection(log: Logger, socket: TcpStream) -> Result<(), Error> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
@ -8,22 +8,16 @@ use slog::Logger;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use toml;
|
||||
|
||||
use futures_signals::signal::Mutable;
|
||||
|
||||
use crate::error::Result;
|
||||
use crate::config::Config;
|
||||
use crate::api::api;
|
||||
use crate::access::Permissions;
|
||||
|
||||
use std::rc::Rc;
|
||||
use async_std::sync::{Arc, RwLock};
|
||||
|
||||
use capnp::capability::Promise;
|
||||
use capnp::Error;
|
||||
use capnp_rpc::Server;
|
||||
|
||||
use uuid::Uuid;
|
||||
use std::ops::DerefMut;
|
||||
|
||||
/// Status of a Machine
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
@ -115,13 +109,13 @@ impl GiveBack {
|
||||
}
|
||||
}
|
||||
|
||||
fn uuid_from_api(uuid: api::u_u_i_d::Reader) -> Uuid {
|
||||
fn uuid_from_api(uuid: crate::api_capnp::u_u_i_d::Reader) -> Uuid {
|
||||
let uuid0 = uuid.get_uuid0() as u128;
|
||||
let uuid1 = uuid.get_uuid1() as u128;
|
||||
let num: u128 = (uuid1 << 64) + uuid0;
|
||||
Uuid::from_u128(num)
|
||||
}
|
||||
fn api_from_uuid(uuid: Uuid, mut wr: api::u_u_i_d::Builder) {
|
||||
fn api_from_uuid(uuid: Uuid, mut wr: crate::api_capnp::u_u_i_d::Builder) {
|
||||
let num = uuid.to_u128_le();
|
||||
let uuid0 = num as u64;
|
||||
let uuid1 = (num >> 64) as u64;
|
||||
|
@ -17,7 +17,7 @@ use signal_hook::iterator::Signals;
|
||||
|
||||
use clap::{App, Arg};
|
||||
|
||||
use api::api as api_capnp;
|
||||
use api::gen as api_capnp;
|
||||
|
||||
use futures::prelude::*;
|
||||
use futures::executor::{LocalPool, ThreadPool};
|
||||
|
Loading…
Reference in New Issue
Block a user