mirror of
https://github.com/Noratrieb/terustform.git
synced 2026-01-14 08:30:13 +01:00
cleanup
This commit is contained in:
parent
18a9d610cd
commit
41e578e199
4 changed files with 14 additions and 6 deletions
12
src/framework.rs
Normal file
12
src/framework.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
pub trait DataSource {
|
||||
fn schema(&self);
|
||||
fn read(&self) -> DResult<()>;
|
||||
}
|
||||
|
||||
pub struct Diagnostics {
|
||||
|
||||
}
|
||||
|
||||
pub type DResult<T> = Result<T, Diagnostics>;
|
||||
|
||||
fn _data_source_obj_safe(_: &dyn DataSource) {}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
mod cert;
|
||||
mod server;
|
||||
mod values;
|
||||
mod framework;
|
||||
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ impl Provider for MyProvider {
|
|||
&self,
|
||||
request: Request<tfplugin6::read_data_source::Request>,
|
||||
) -> Result<Response<tfplugin6::read_data_source::Response>, Status> {
|
||||
tracing::error!("read_data_source");
|
||||
tracing::info!("read_data_source");
|
||||
|
||||
let reply = tfplugin6::read_data_source::Response {
|
||||
state: Some(tfplugin6::DynamicValue {
|
||||
|
|
|
|||
|
|
@ -17,11 +17,6 @@ impl Type {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct DynamicValue {
|
||||
msgpack: Option<Vec<u8>>,
|
||||
json: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
// this is very dumb and wrong
|
||||
pub enum Value {
|
||||
String(String),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue