Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
Boards []*IndexBoard
IsTrusted bool
}
Index represents Boards struct as seen from module_firmware_index.json file.
func LoadIndex ¶
LoadIndex reads a module_firmware_index.json from a file and returns the corresponding Index structure.
func LoadIndexNoSign ¶
LoadIndexNoSign reads a module_firmware_index.json from a file and returns the corresponding Index structure.
func (*Index) GetBoard ¶
func (i *Index) GetBoard(fqbn string) *IndexBoard
GetBoard returns the IndexBoard for the given FQBN
type IndexBoard ¶
type IndexBoard struct {
Fqbn string `json:"fqbn"`
Firmwares []*IndexFirmware `json:"firmware"`
Module string `json:"module"`
Name string `json:"name"`
UploaderPlugin string `json:"uploader_plugin"`
AdditionalTools []string `json:"additional_tools"`
}
IndexBoard represents a single entry from module_firmware_index.json file.
func (*IndexBoard) GetFirmware ¶
func (b *IndexBoard) GetFirmware(version string) *IndexFirmware
GetFirmware returns the specified IndexFirmware version for this board. Returns nil if version is not found.
func (*IndexBoard) LatestFirmware ¶
func (b *IndexBoard) LatestFirmware() *IndexFirmware
LatestFirmware returns the latest firmware version for the IndexBoard
func (*IndexBoard) Overlaps ¶
func (b *IndexBoard) Overlaps(x *IndexBoard) bool
Overlaps returns true if the two IndexBoard represent the same board.
type IndexFirmware ¶
type IndexFirmware struct {
Version *semver.RelaxedVersion `json:"version"`
URL string `json:"url"`
Checksum string `json:"checksum"`
Size json.Number `json:"size"`
Module string `json:"module"`
}
IndexFirmware represents a single Firmware version from module_firmware_index.json file.
type IndexSketch ¶
type IndexSketch struct {
URL string `json:"url"`
Checksum string `json:"checksum"`
Size json.Number `json:"size"`
}
IndexSketch represents a sketch used to manage firmware on a board.
type IndexUploaderCommand ¶
type IndexUploaderCommand struct {
Linux string `json:"linux"`
Windows string `json:"windows"`
Macosx string `json:"macosx"`
}
IndexUploaderCommand represents the command-line to use for different OS