mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-10 17:43:23 +01:00
Implement getAPIVersion and getServerRelease methods
This commit is contained in:
parent
0da3213395
commit
bf9fadbf74
27
src/api.rs
27
src/api.rs
@ -43,7 +43,10 @@ impl Bootstrap {
|
||||
}
|
||||
}
|
||||
|
||||
use connection_capnp::{API_VERSION_MAJOR, API_VERSION_MINOR, API_VERSION_PATCH};
|
||||
use connection_capnp::bootstrap::*;
|
||||
use crate::RELEASE;
|
||||
|
||||
impl connection_capnp::bootstrap::Server for Bootstrap {
|
||||
fn authentication_system(&mut self,
|
||||
_: AuthenticationSystemParams,
|
||||
@ -99,4 +102,28 @@ impl connection_capnp::bootstrap::Server for Bootstrap {
|
||||
|
||||
Promise::ok(())
|
||||
}
|
||||
|
||||
fn get_a_p_i_version(
|
||||
&mut self,
|
||||
_: GetAPIVersionParams,
|
||||
mut results: GetAPIVersionResults
|
||||
) -> Promise<(), capnp::Error> {
|
||||
let mut builder = results.get();
|
||||
let mut builder = builder.init_version();
|
||||
builder.set_major(API_VERSION_MAJOR);
|
||||
builder.set_minor(API_VERSION_MINOR);
|
||||
builder.set_patch(API_VERSION_PATCH);
|
||||
Promise::ok(())
|
||||
}
|
||||
|
||||
fn get_server_release(
|
||||
&mut self,
|
||||
_: GetServerReleaseParams,
|
||||
mut results: GetServerReleaseResults
|
||||
) -> Promise<(), capnp::Error> {
|
||||
let mut builder = results.get();
|
||||
builder.set_name("bffh");
|
||||
builder.set_release(RELEASE);
|
||||
Promise::ok(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user