initializeGeigerData function

Future initializeGeigerData(
  1. dynamic indicatorID
)

Implementation

Future initializeGeigerData(var indicatorID) async {
  final localMaster =
  (await getGeigerApi('', GeigerApi.masterId, Declaration.doNotShareData))
  !;

  Storage.geigerIndicatorUUID = indicatorID;
  Storage.controller = localMaster.getStorage();

  await createLocal();
  await init(Types.users);
  await init(Types.devices);

  await getExistScoreNodes(Types.users, Types.geigerScoreUser);
  await getExistScoreNodes(Types.devices, Types.geigerScoreDevice);
  await getExistScoreNodes(Types.users, Types.recommendations);
  await getExistScoreNodes(Types.devices, Types.recommendations);
  await getExistScoreNodes(Types.users, Types.geigerScoreAggregate);
  await getExistScoreNodes(Types.enterprise,Types.geigerScoreMSE);

  await createThreats();
  await createPlugin();
  await createProfiles();
  await createRecommendations();
  await createEnterprise();

}