Documentation ¶
Index ¶
Constants ¶
View Source
const UpdateMetadataFilename = "updatemetadata.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompressedObject ¶
type FirmwareMetadata ¶
type FirmwareMetadata struct { ProductUID string `json:"product-uid"` DeviceIdentity map[string]string `json:"device-identity"` Version string `json:"version"` Hardware string `json:"hardware"` DeviceAttributes map[string]string `json:"device-attributes"` }
func NewFirmwareMetadata ¶
func NewFirmwareMetadata(basePath string, store afero.Fs, cmd utils.CmdLineExecuter) (*FirmwareMetadata, error)
func (*FirmwareMetadata) CheckSupportedHardware ¶
func (fm *FirmwareMetadata) CheckSupportedHardware(um *UpdateMetadata) error
type Object ¶
type Object interface { Setup() error Install(downloadDir string) error Cleanup() error GetObjectMetadata() ObjectMetadata }
func NewObjectMetadata ¶
type ObjectMetadata ¶
type ObjectMetadata struct { Object `json:"-"` Sha256sum string `json:"sha256sum"` Mode string `json:"mode"` Size int64 `json:"size"` Compressed bool `json:"bool"` InstallIfDifferent interface{} `json:"install-if-different,omitempty"` }
ObjectMetadata contains the common properties of a package's object from JSON metadata
func (ObjectMetadata) GetObjectMetadata ¶
func (o ObjectMetadata) GetObjectMetadata() ObjectMetadata
type SupportedHardwareChecker ¶
type SupportedHardwareChecker interface {
CheckSupportedHardware(um *UpdateMetadata) error
}
type UpdateMetadata ¶
type UpdateMetadata struct { ProductUID string `json:"product"` Version string `json:"version"` Objects [][]Object `json:"-"` SupportedHardware interface{} `json:"supported-hardware"` RawBytes []byte }
func NewUpdateMetadata ¶
func NewUpdateMetadata(bytes []byte) (*UpdateMetadata, error)
func (*UpdateMetadata) PackageUID ¶
func (m *UpdateMetadata) PackageUID() string
func (*UpdateMetadata) VerifySignature ¶
func (m *UpdateMetadata) VerifySignature(key *rsa.PublicKey, signature []byte) bool
Click to show internal directories.
Click to hide internal directories.