Skip to content

InfluxRepo

Namespace: Database.Repository.InfluxRepo.Influx

public class InfluxRepo : Database.Repository.InfluxRepo.IInfluxRepo

Inheritance ObjectInfluxRepo

Implements IInfluxRepo

Constructors

InfluxRepo(IConfiguration, ILogger<InfluxRepo>)

Constructor for the InfluxRepo class.

public InfluxRepo(IConfiguration configuration, ILogger<InfluxRepo> logger)

Parameters

configuration IConfiguration

Configuration used to retrieve the settings.

logger ILogger<InfluxRepo>

Logger instance for capturing diagnostics.

Exceptions

ArgumentException

Thrown when the configurations are missing.

Methods

GetOutsideWeatherData(DateTime, DateTime, String)

public IAsyncEnumerable<Object[]> GetOutsideWeatherData(DateTime start, DateTime end, string place)

Parameters

start DateTime

end DateTime

place String

Returns

IAsyncEnumerable<Object[]>

GetSensorWeatherData(DateTime, DateTime, String)

public IAsyncEnumerable<Object[]> GetSensorWeatherData(DateTime start, DateTime end, string sensor)

Parameters

start DateTime

end DateTime

sensor String

Returns

IAsyncEnumerable<Object[]>

GetUptime(String)

public IAsyncEnumerable<PointDataValues> GetUptime(string sensor)

Parameters

sensor String

Returns

IAsyncEnumerable<PointDataValues>

WriteOutsideWeatherData(String, String, Double, DateTime, Int32)

public Task WriteOutsideWeatherData(string place, string website, double temperature, DateTime timestamp, int postalcode)

Parameters

place String

website String

temperature Double

timestamp DateTime

postalcode Int32

Returns

Task

WriteSensorData(Double, String, Int64, Int32)

public Task WriteSensorData(double measurement, string sensor, long timestamp, int sequence)

Parameters

measurement Double

sensor String

timestamp Int64

sequence Int32

Returns

Task

WriteUptime(String, Int64)

public Task WriteUptime(string sensor, long timestamp)

Parameters

sensor String

timestamp Int64

Returns

Task