Files
cloud-services/pkg/common/updateconfigmanifest.go

16 lines
797 B
Go

package common
// This manifest type is used to send a configuration to a car
type UpdateConfigManifest struct {
CarUpdateID int64 `json:"car_update_id,omitempty" pg:"-"`
ECUs []*UpdateConfigManifestECU `json:"ecu_updates,omitempty" pg:"rel:has-many" validate:"omitempty,min=1,dive"`
Type string `json:"type,omitempty" validate:"max=100"` // This can be maybe removed, since only one type of update will be sent with this\
VOD string `json:"vod,omitempty" pg:"vod"`
}
type UpdateConfigManifestECU struct {
ECU string `json:"name,omitempty" pg:",unique:updatemanifestid_ecu_partnumber" validate:"required,min=2,max=10"`
Configuration string `json:"configuration,omitempty" validate:"max=5000"`
}