WW3R2OTSI3NJJP2HXQ7QHBGYOO3NVS2NM3OQBDTLX5JQ3Z2DO7NAC
HAVWPOXJXKLKF6P4ATMK52LEVARG4UURFFGCFN5EA4ZMF4JZGARAC
3DMSJR64RXGFQMHBPJ3RS7GYR537WISXHNEVQY63S7WFNSK6EM3AC
36H3LIVEN7MC5BEQ3VFCNSXCMT7TBDOVEZXRJJKMQDFDBY53STGAC
WLOVZ5OJEFQG57LMUNNIFHX6E7J5OZ6L2HEKY3N7KNNSLWMP2I4AC
2SQFSBLL73SZQFVNRGAJJ6DWJC7PH423NCT3LNDP5BCNFGFQK4CQC
LAST6KDHOOQQBH2PVJUIXXGELKD7YUU4R7OV2JSUMK7TIMABJUUQC
impl Bookstore for BookStoreImpl {
async fn get_book(
&self,
request: Request<GetBookRequest>,
) -> Result<Response<GetBookResponse>, Status> {
impl RFKPOS for RFKPOSImpl {
asynf fn new_transaction(&self, request: Request<Transaction>) -> Result<Response<TransactionReturn>, Status> {
let response = GetBookResponse {
id: request.into_inner().id,
author: "Peter".to_owned(),
name: "Zero to One".to_owned(),
year: 2014,
};
Ok(Response::new(response))
asynf fn last_transaction(&self) -> Result<Response<TransactionReturn>, Status> {
println!("Request from {:?}", request.remote_addr());
Ok(Response::new(TransactionReturn { err: Error { message = "Not implemented", prio = ERR_CRITICAL } }))
let bookstore = BookStoreImpl::default();
let bookstore_auth = Arc::clone(&authenticator);
let bookstore_svc = BookstoreServer::with_interceptor(bookstore, move |r| check_auth(r, bookstore_auth.clone()));
let rfkpos = RFKPOSImpl::default();
let rfkpos_auth = Arc::clone(&authenticator);
let rfkpos_svc = RFKPOSServer::with_interceptor(rfkpos, move |r| check_auth(r, rfkpos_auth.clone()));