more movement

This commit is contained in:
nora 2024-04-15 20:41:01 +02:00
parent 991642b90d
commit dc76e01e92
8 changed files with 132 additions and 111 deletions

View file

@ -32,6 +32,7 @@ struct ExampleDataSourceModel {
id: StringValue,
}
#[terustform::async_trait]
impl DataSource for ExampleDataSource {
fn name(&self, provider_name: &str) -> String {
format!("{provider_name}_kitty")
@ -69,7 +70,7 @@ impl DataSource for ExampleDataSource {
}
}
fn read(&self, config: Value) -> DResult<Value> {
async fn read(&self, config: Value) -> DResult<Value> {
let mut model = ExampleDataSourceModel::from_value(config, &AttrPath::root())?;
let name_str = model.name.expect_known(AttrPath::attr("name"))?;