use http::Uri; use spotflow::DeviceClientBuilder; mod common; fn main() { // Parameters required from the user let store_path = "spotflow.db"; let provisioning_token = "CAEQAQ.ChIJrQttEdCSxUARoVQJDmRVorI.cF63b-v-FUd_1QwUIOyEWfJ_9dyQwrM6kBw0vO22JtoZ60ZnRAkMKAec6hd7Zwcl6Mqx_-rk9VY6EmK3ycyb_gVLsT9Tw3vqh0OEUfM9FpTeSNv0_GReFMJkb_95kpwg"; // Hard-coded constants (will be hardcoded for the public multi-tenant instance) let instance_url = "https://tst1.dataplatform.datamole.dev"; // Initialize provisioning operation with a generated device ID let instance_url = Uri::from_static(instance_url); let provisioning_token = String::from(provisioning_token); let device_id = "test-device"; let workspace_id = "98d5945d-bf04-49de-ad48-45fc01869075"; // Persist connection credentials let _client = DeviceClientBuilder::new(Some(device_id.to_string()), provisioning_token, store_path) .with_instance(instance_url.to_string()) .with_display_provisioning_operation_callback(Box::new( common::ProvisioningOperationApprovalHandler::new( instance_url.clone(), workspace_id.to_string(), ), )) .build() .expect("Unable to build ingress connection"); println!("Connection persisted"); // Start sending data to the platform // TODO }