Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceDataController ¶
type DeviceDataController struct {
Settings *config.Settings
// contains filtered or unexported fields
}
func NewDeviceDataController ¶
func NewDeviceDataController(settings *config.Settings, logger *zerolog.Logger) DeviceDataController
NewDeviceDataController constructor
func (*DeviceDataController) GetDistanceDriven ¶ added in v0.1.4
func (d *DeviceDataController) GetDistanceDriven(c *fiber.Ctx) error
GetDistanceDriven godoc @Description Get kilometers driven for a userDeviceID since connected (ie. since we have data available) @Description if it returns 0 for distanceDriven it means we have no odometer data. @Tags device-data @Produce json @Success 200 @Failure 404 "no device found for user with provided parameters" @Param userDeviceID path string true "user device id" @Security BearerAuth @Router /user/device-data/{userDeviceID}/distance-driven [get]
func (*DeviceDataController) GetHistoricalRaw ¶
func (d *DeviceDataController) GetHistoricalRaw(c *fiber.Ctx) error
GetHistoricalRaw godoc @Description Get all historical data for a userDeviceID, within start and end range @Tags device-data @Produce json @Success 200 @Param userDeviceID path string true "user id" @Param startDate query string false "startDate eg 2022-01-02. if empty two weeks back" @Param endDate query string false "endDate eg 2022-03-01. if empty today" @Security BearerAuth @Router /user/device-data/{userDeviceID}/historical [get]