38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package models
|
|
|
|
// FirmwareMetadata represents the metadata structure for firmware uploads
|
|
type FirmwareMetadata struct {
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Labels map[string]string `json:"labels"`
|
|
}
|
|
|
|
// FirmwareRecord represents a firmware record in the database
|
|
type FirmwareRecord struct {
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Size int64 `json:"size"`
|
|
Labels map[string]string `json:"labels"`
|
|
Path string `json:"download_url"`
|
|
}
|
|
|
|
// GroupedFirmware represents firmware grouped by name
|
|
type GroupedFirmware struct {
|
|
Name string `json:"name"`
|
|
Firmware []FirmwareRecord `json:"firmware"`
|
|
}
|
|
|
|
// UploadResponse represents the response for firmware upload
|
|
type UploadResponse struct {
|
|
Success bool `json:"success"`
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Size int64 `json:"size"`
|
|
Message string `json:"message,omitempty"`
|
|
}
|
|
|
|
// HealthResponse represents the health check response
|
|
type HealthResponse struct {
|
|
Status string `json:"status"`
|
|
}
|