ota

package
v0.0.0-...-0aa8592 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelOta

func CancelOta(otaid string, cred *config.Credentials) error

func Encode

func Encode(params *EncodeParams) (*string, error)

Encode command is used to encode a firmware OTA

func Generate

func Generate(binFile string, outFile string, fqbn string) error

Generate takes a .bin file and generates a .ota file.

func PrintOtaStatus

func PrintOtaStatus(otaid, otaids, device string, cred *config.Credentials, limit int, order string) error

func ReadHeader

func ReadHeader(params *ReadHeaderParams) error

Encode command is used to encode a firmware OTA

func Upload

func Upload(ctx context.Context, params *UploadParams, cred *config.Credentials) error

Upload command is used to upload a firmware OTA, on a device of Arduino IoT Cloud.

Types

type EncodeParams

type EncodeParams struct {
	FQBN string
	File string
}

type MassUploadParams

type MassUploadParams struct {
	DeviceIDs        []string
	Tags             map[string]string
	File             string
	Deferred         bool
	DoNotApplyHeader bool
	FQBN             string
}

MassUploadParams contains the parameters needed to perform a Mass OTA upload.

type ReadHeaderParams

type ReadHeaderParams struct {
	File string
}

type Result

type Result struct {
	ID        string
	Err       error
	OtaStatus otaapi.Ota
}

Result of an ota upload on a device.

func MassUpload

func MassUpload(ctx context.Context, params *MassUploadParams, cred *config.Credentials) ([]Result, error)

MassUpload command is used to mass upload a firmware OTA, on devices of Arduino IoT Cloud.

type UploadParams

type UploadParams struct {
	DeviceID         string
	File             string
	Deferred         bool
	DoNotApplyHeader bool
}

UploadParams contains the parameters needed to perform an OTA upload.

Jump to

Keyboard shortcuts

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