Documentation ¶
Index ¶
- type DeviceConfigController
- func (d *DeviceConfigController) GetConfigURLs(c *fiber.Ctx, ud *pb.UserDevice) error
- func (d *DeviceConfigController) GetConfigURLsFromEthAddr(c *fiber.Ctx) error
- func (d *DeviceConfigController) GetConfigURLsFromVIN(c *fiber.Ctx) error
- func (d *DeviceConfigController) GetDBCFileByTemplateName(c *fiber.Ctx) error
- func (d *DeviceConfigController) GetDeviceSettingsByTemplate(c *fiber.Ctx) error
- func (d *DeviceConfigController) GetPIDsByTemplate(c *fiber.Ctx) error
- type DeviceConfigResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceConfigController ¶
type DeviceConfigController struct {
// contains filtered or unexported fields
}
func NewDeviceConfigController ¶
func NewDeviceConfigController(settings *config.Settings, logger *zerolog.Logger, database *sql.DB, userDeviceSvc services.UserDeviceService, deviceDefSvc services.DeviceDefinitionsService) DeviceConfigController
NewDeviceConfigController constructor
func (*DeviceConfigController) GetConfigURLs ¶
func (d *DeviceConfigController) GetConfigURLs(c *fiber.Ctx, ud *pb.UserDevice) error
func (*DeviceConfigController) GetConfigURLsFromEthAddr ¶ added in v0.3.2
func (d *DeviceConfigController) GetConfigURLsFromEthAddr(c *fiber.Ctx) error
GetConfigURLsFromEthAddr godoc @Description Retrieve the URLs for PID, DeviceSettings, and DBC configuration based on device's Ethereum Address. These could be empty if not configs available @Tags vehicle-signal-decoding @Produce json @Success 200 {object} DeviceConfigResponse "Successfully retrieved configuration URLs" @Failure 404 "Not Found - No templates available for the given parameters" @Failure 400 "incorrect eth addr format" @Param ethAddr path string false "Ethereum Address" @Router /device-config/eth-addr/{ethAddr}/urls [get]
func (*DeviceConfigController) GetConfigURLsFromVIN ¶ added in v0.3.2
func (d *DeviceConfigController) GetConfigURLsFromVIN(c *fiber.Ctx) error
GetConfigURLsFromVIN godoc @Description Retrieve the URLs for PID, DeviceSettings, and DBC configuration based on a given VIN. These could be empty if not configs available @Tags vehicle-signal-decoding @Produce json @Success 200 {object} DeviceConfigResponse "Successfully retrieved configuration URLs" @Failure 404 "Not Found - No templates available for the given parameters" @Param vin path string true "vehicle identification number (VIN)" @Router /device-config/vin/{vin}/urls [get]
func (*DeviceConfigController) GetDBCFileByTemplateName ¶
func (d *DeviceConfigController) GetDBCFileByTemplateName(c *fiber.Ctx) error
GetDBCFileByTemplateName godoc @Description Fetches the DBC file from the dbc_files table given a template name @Tags vehicle-signal-decoding @Produce plain @Success 200 {string} string "Successfully retrieved DBC file" @Failure 404 "No DBC file found for the given template name." @Param templateName path string true "template name" @Router /device-config/{templateName}/dbc [get]
func (*DeviceConfigController) GetDeviceSettingsByTemplate ¶
func (d *DeviceConfigController) GetDeviceSettingsByTemplate(c *fiber.Ctx) error
GetDeviceSettingsByTemplate godoc @Description Fetches the device settings configurations from device_settings table given a template name @Tags vehicle-signal-decoding @Produce json @Success 200 {object} grpc.DeviceSetting "Successfully retrieved Device Settings" @Failure 404 "No Device Settings data found for the given template name." @Param templateName path string true "template name" @Router /device-config/{templateName}/device-settings [get]
func (*DeviceConfigController) GetPIDsByTemplate ¶
func (d *DeviceConfigController) GetPIDsByTemplate(c *fiber.Ctx) error
GetPIDsByTemplate godoc @Description Retrieves a list of PID configurations from the database given a template name @Tags vehicle-signal-decoding @Produce json @Success 200 {object} grpc.PIDRequests "Successfully retrieved PID Configurations" @Failure 404 "No PID Config data found for the given template name." @Param templateName path string true "template name" @Router /device-config/{templateName}/pids [get]