Documentation ¶
Index ¶
Constants ¶
const ( // URL of cloud-team binary index. IndexGZURL = "https://cloud-downloads.arduino.cc/binaries/index.json.gz" IndexSigURL = "https://cloud-downloads.arduino.cc/binaries/index.json.sig" )
Variables ¶
This section is empty.
Functions ¶
func VerifyChecksum ¶
VerifyChecksum has been extracted from github.com/arduino/arduino-fwupload : https://github.com/arduino/arduino-fwuploader/blob/fc20a808ece9a082e043e13e3cfa69c571721d76/indexes/download/download.go
We're not using arduino-fwuploader directly as a dependency because it indirectly depends on github.com/daaku/go.zipexe which panics during an 'init' function, causing cloud-cli to panic when compiled with go1.19. More on the issue here: https://github.com/golang/go/issues/54227 .
Types ¶
type Index ¶
type Index struct {
Boards []IndexBoard `json:"boards"`
}
Index contains details about all the binaries loaded in 'cloud-downloads'.
func LoadIndex ¶
LoadIndex downloads and verifies the index of binaries contained in 'cloud-downloads'.
func (*Index) FindProvisionBin ¶
FindProvisionBin looks for the provisioning binary corresponding to the passed fqbn in the index. Returns nil if the binary is not found.
type IndexBin ¶
type IndexBin struct { URL string `json:"url"` Checksum string `json:"checksum"` Size json.Number `json:"size"` }
IndexBin contains the details needed to retrieve a binary file from the cloud.
type IndexBoard ¶
IndexBoard describes all the binaries available for a specific board.