use lazy_static::lazy_static;
pub mod cloud_vision;
pub mod vertex;
lazy_static! {
static ref GOOGLE_CLOUD_SERVICE_API_PREFIX: String = String::from(
std::option_env!("GOOGLE_CLOUD_SERVICE_API_PREFIX")
.unwrap_or("https://google-cloud-service.flows.network/api")
);
}
extern "C" {
fn get_flows_user(p: *mut u8) -> i32;
fn get_flow_id(p: *mut u8) -> i32;
}
unsafe fn _get_flows_user() -> String {
let mut flows_user = Vec::<u8>::with_capacity(100);
let c = get_flows_user(flows_user.as_mut_ptr());
flows_user.set_len(c as usize);
String::from_utf8(flows_user).unwrap()
}
unsafe fn _get_flow_id() -> String {
let mut flow_id = Vec::<u8>::with_capacity(100);
let c = get_flow_id(flow_id.as_mut_ptr());
if c == 0 {
panic!("Failed to get flow id");
}
flow_id.set_len(c as usize);
String::from_utf8(flow_id).unwrap()
}