Documentation ¶
Index ¶
Constants ¶
View Source
const ( FirmwareTypeUndefined = FirmwareType(iota) FirmwareTypeBIOS EndOfFirmwareType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Firmware ¶
type Firmware struct { ID int64 `db:"id,pk"` Type FirmwareType `db:"type"` Version string `db:"version"` ImageURL string `db:"image_url"` // loaded from other tables Targets []*FirmwareTarget `db:"-"` Measurements []*FirmwareMeasurement `db:"-"` }
Firmware represent a row of table containing metadata about firmware images.
type FirmwareMeasurement ¶
type FirmwareMeasurement struct { ID int64 `db:"id,pk"` FirmwareID int64 `db:"firmware_id"` MeasurementTypeID int64 `db:"type_id"` Value types.ConvertedBytes `db:"value"` // loaded from other tables Firmware *Firmware `db:"-"` FirmwareMeasurementType *FirmwareMeasurementType `db:"-"` }
type FirmwareMeasurementMetadata ¶
type FirmwareMeasurementMetadata struct { ID int64 `db:"id,pk"` MeasurementTypeID int64 `db:"type_id"` Key string `db:"key"` Value string `db:"value"` // loaded from other tables FirmwareMeasurementType *FirmwareMeasurementType `db:"-"` }
type FirmwareMeasurementType ¶
type FirmwareMeasurementType struct { ID int64 `db:"id,pk"` Name string `db:"name"` Description string `db:"description"` // loaded from other tables Metadata []*FirmwareMeasurementMetadata `db:"-"` }
type FirmwareTarget ¶
type FirmwareTarget struct { ID int64 `db:"id,pk"` FirmwareID int64 `db:"firmware_id"` ModelID *int64 `db:"model_id"` Hostname *string `db:"hostname"` // loaded from other tables Firmware *Firmware `db:"-"` }
FirmwareTarget represent a row of table containing connections information where a firmware should be applied
type FirmwareType ¶
type FirmwareType uint
func (*FirmwareType) Scan ¶
func (t *FirmwareType) Scan(srcI any) error
Scan converts DB's a value to the FirmwareType.
func (FirmwareType) String ¶
func (t FirmwareType) String() string
Click to show internal directories.
Click to hide internal directories.