mirror of
https://github.com/Noratrieb/terustform.git
synced 2026-01-14 16:35:11 +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 cert;
|
||||||
mod server;
|
mod server;
|
||||||
mod values;
|
mod values;
|
||||||
|
mod framework;
|
||||||
|
|
||||||
use std::{env, path::PathBuf};
|
use std::{env, path::PathBuf};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ impl Provider for MyProvider {
|
||||||
&self,
|
&self,
|
||||||
request: Request<tfplugin6::read_data_source::Request>,
|
request: Request<tfplugin6::read_data_source::Request>,
|
||||||
) -> Result<Response<tfplugin6::read_data_source::Response>, Status> {
|
) -> 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 {
|
let reply = tfplugin6::read_data_source::Response {
|
||||||
state: Some(tfplugin6::DynamicValue {
|
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
|
// this is very dumb and wrong
|
||||||
pub enum Value {
|
pub enum Value {
|
||||||
String(String),
|
String(String),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue