Documentation ¶
Index ¶
- type DeviceConfigController
- 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) GetDeviceSettingsByName(c *fiber.Ctx) error
- func (d *DeviceConfigController) GetPIDsByTemplate(c *fiber.Ctx) error
- type DeviceConfigResponse
- type JobResponse
- type JobsController
- type SettingsData
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) 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 true "Ethereum Address" @Param protocol query string false "CAN Protocol, '6' or '7'" @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)" @Param protocol query string false "CAN Protocol, '6' or '7'" @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) GetDeviceSettingsByName ¶ added in v0.6.4
func (d *DeviceConfigController) GetDeviceSettingsByName(c *fiber.Ctx) error
GetDeviceSettingsByName godoc @Description Fetches the device settings configurations from device_settings table given a name. Note that device settings mostly only vary by powertrain and @Description may or may not be attached to a specific template. To return protobuf: "application/x-protobuf" @Description Note that the templateName returned here is actually the device setting name @Tags vehicle-signal-decoding @Produce json @Produce application/x-protobuf @Success 200 {object} grpc.DeviceSetting "Successfully retrieved Device Settings" @Failure 404 "No Device Settings data found for the given name." @Param name path string true "name" @Router /device-config/settings/{name} [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 @Produce application/x-protobuf @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]
type DeviceConfigResponse ¶ added in v0.2.8
type JobResponse ¶ added in v0.6.2
type JobsController ¶ added in v0.6.2
type JobsController struct {
// contains filtered or unexported fields
}
func NewJobsController ¶ added in v0.6.2
func NewJobsController(settings *config.Settings, logger *zerolog.Logger, database *sql.DB, userDeviceSvc services.UserDeviceService, deviceDefSvc services.DeviceDefinitionsService) JobsController
NewJobsController constructor
func (*JobsController) GetJobsFromEthAddr ¶ added in v0.6.2
func (d *JobsController) GetJobsFromEthAddr(c *fiber.Ctx) error
GetJobsFromEthAddr godoc @Description Retrieve the jobs based on device's Ethereum Address. @Tags vehicle-signal-decoding @Produce json @Success 200 {object} JobResponse "Successfully retrieved jobs" @Failure 400 "incorrect eth addr format" @Param ethAddr path string false "Ethereum Address" @Router /device-config/eth-addr/{ethAddr}/jobs [get]
func (*JobsController) GetJobsPendingFromEthAddr ¶ added in v0.6.2
func (d *JobsController) GetJobsPendingFromEthAddr(c *fiber.Ctx) error
GetJobsPendingFromEthAddr godoc @Description Retrieve the jobs based on device's Ethereum Address. @Tags vehicle-signal-decoding @Produce json @Success 200 {object} JobResponse "Successfully retrieved jobs" @Failure 400 "incorrect eth addr format" @Param ethAddr path string false "Ethereum Address" @Router /device-config/eth-addr/{ethAddr}/jobs/pending [get]
func (*JobsController) PatchJobsFromEthAddr ¶ added in v0.6.2
func (d *JobsController) PatchJobsFromEthAddr(c *fiber.Ctx) error
PatchJobsFromEthAddr godoc @Description Path job status based on device's Ethereum Address. @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" @Param jobId path string false "Job ID" @Router /device-config/eth-addr/{ethAddr}/jobs/{jobId}/{status} [patch]