use std::path::Path;
use std::time::Duration;
use std::time::SystemTime;
use async_trait::async_trait;
use http::{Request, Response};
#[allow(unused_variables)]
#[async_trait]
pub trait Extio {
type Error: std::fmt::Debug + Send + Sync + 'static;
fn read_file(&self, path: &Path) -> Result<Vec<u8>, Self::Error> {
unimplemented!("read_file not implemented")
}
fn write_file(&self, path: &Path, data: &[u8]) -> Result<(), Self::Error> {
unimplemented!("write_file not implemented")
}
fn delete_file(&self, path: &Path) -> Result<(), Self::Error> {
unimplemented!("delete_file not implemented")
}
fn list_dir(&self, path: &Path) -> Result<Vec<String>, Self::Error> {
unimplemented!("list_dir not implemented")
}
async fn storage_put(&self, key: &str, data: Vec<u8>) -> Result<(), Self::Error> {
unimplemented!("storage_put not implemented")
}
async fn storage_get(&self, key: &str) -> Result<Vec<u8>, Self::Error> {
unimplemented!("storage_get not implemented")
}
async fn storage_delete(&self, key: &str) -> Result<(), Self::Error> {
unimplemented!("storage_delete not implemented")
}
async fn http_request(&self, req: Request<Vec<u8>>) -> Result<Response<Vec<u8>>, Self::Error> {
unimplemented!("http_request not implemented")
}
async fn tcp_send(&self, addr: &str, data: &[u8]) -> Result<Vec<u8>, Self::Error> {
unimplemented!("tcp_send not implemented")
}
async fn udp_send(&self, addr: &str, data: &[u8]) -> Result<(), Self::Error> {
unimplemented!("udp_send not implemented")
}
async fn ws_connect(&self, url: &str) -> Result<(), Self::Error> {
unimplemented!("ws_connect not implemented")
}
async fn ws_send(&self, msg: &[u8]) -> Result<(), Self::Error> {
unimplemented!("ws_send not implemented")
}
async fn ws_receive(&self) -> Result<Vec<u8>, Self::Error> {
unimplemented!("ws_receive not implemented")
}
async fn db_query(&self, query: &str, params: &[u8]) -> Result<Vec<u8>, Self::Error> {
unimplemented!("db_query not implemented")
}
async fn db_execute(&self, query: &str, params: &[u8]) -> Result<u64, Self::Error> {
unimplemented!("db_execute not implemented")
}
async fn exec(&self, cmd: &str, args: &[&str]) -> Result<(i32, Vec<u8>), Self::Error> {
unimplemented!("exec not implemented")
}
async fn mq_publish(&self, topic: &str, data: &[u8]) -> Result<(), Self::Error> {
unimplemented!("mq_publish not implemented")
}
async fn mq_consume(&self, topic: &str) -> Result<Vec<u8>, Self::Error> {
unimplemented!("mq_consume not implemented")
}
async fn ipc_send(&self, channel: &str, data: &[u8]) -> Result<(), Self::Error> {
unimplemented!("ipc_send not implemented")
}
async fn ipc_receive(&self, channel: &str) -> Result<Vec<u8>, Self::Error> {
unimplemented!("ipc_receive not implemented")
}
fn now(&self) -> SystemTime {
SystemTime::now()
}
async fn sleep(&self, dur: Duration) {
unimplemented!("sleep not implemented")
}
fn get_env(&self, key: &str) -> Option<String> {
unimplemented!("get_env not implemented")
}
fn set_env(&self, key: &str, value: &str) {
unimplemented!("set_env not implemented")
}
fn log(&self, level: &str, msg: &str) {
unimplemented!("log not implemented")
}
fn record_metric(&self, name: &str, value: f64) {
unimplemented!("record_metric not implemented")
}
fn get_secret(&self, key: &str) -> Result<Vec<u8>, Self::Error> {
unimplemented!("get_secret not implemented")
}
fn sign(&self, data: &[u8]) -> Result<Vec<u8>, Self::Error> {
unimplemented!("sign not implemented")
}
fn verify(&self, data: &[u8], sig: &[u8]) -> Result<bool, Self::Error> {
unimplemented!("verify not implemented")
}
}