Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package common
func NewApprovalUpdates(cu *CarUpdate) ApprovalUpdate {
a := ApprovalUpdate{}
a.Update(cu)
return a
}
type ApprovalUpdate struct {
ID int64 `json:"id,omitempty"`
VIN string `json:"vin"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Description string `json:"description,omitempty"`
ReleaseNotes string `json:"release_notes,omitempty"`
}
func (a *ApprovalUpdate) Update(cu *CarUpdate) {
a.ID = cu.ID
a.VIN = cu.VIN
if cu.UpdateManifest == nil {
return
}
m := cu.UpdateManifest
a.Name = m.Name
a.Version = m.Version
a.Description = m.Description
a.ReleaseNotes = m.ReleaseNotes
}