metadata

package
v0.0.0-...-e08062c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2017 License: GPL-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressedObject

type CompressedObject struct {
	CompressedSize   float64 `json:"required-compressed-size"`
	UncompressedSize float64 `json:"required-uncompressed-size"`
}

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"`
	HardwareRevision string            `json:"hardware-revision"`
	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 Hardware

type Hardware struct {
	Hardware         string `json:"hardware"`
	HardwareRevision string `json:"hardware-revision"`
}

type Object

type Object interface {
	handlers.InstallUpdateHandler

	GetObjectMetadata() ObjectMetadata
}

func NewObjectMetadata

func NewObjectMetadata(bytes []byte) (Object, error)

type ObjectMetadata

type ObjectMetadata struct {
	Object `json:"-"`

	Sha256sum          string      `json:"sha256sum"`
	Mode               string      `json:"mode"`
	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-uid"`
	Version           string     `json:"version"`
	Objects           [][]Object `json:"-"`
	SupportedHardware []Hardware `json:"supported-hardware"`
	RawBytes          []byte
}

func NewUpdateMetadata

func NewUpdateMetadata(bytes []byte) (*UpdateMetadata, error)

func (*UpdateMetadata) PackageUID

func (m *UpdateMetadata) PackageUID() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL