plugin

package
v0.0.0-...-c43e86c Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlashCertificatesResult

type FlashCertificatesResult struct {
	Error  string
	Stdout []byte
	Stderr []byte
}

FlashCertificatesResult contains the result of GetFirmwareVersion command

type FlashFirmwareResult

type FlashFirmwareResult struct {
	Error  string
	Stdout []byte
	Stderr []byte
}

GetFirmwareVersionResult contains the result of GetFirmwareVersion command

type FwUploader

type FwUploader struct {
	// contains filtered or unexported fields
}

FwUploadr is an helper to run a fwuploader-plugin.

func NewFWUploaderPlugin

func NewFWUploaderPlugin(pluginDir *paths.Path) (*FwUploader, error)

NewFWUploaderPlugin creates a new FWUploader, pluginDir must point to the plugin directory.

func (*FwUploader) FlashCertificates

func (uploader *FwUploader) FlashCertificates(portAddress, fqbn, LogLevel string, verbose bool, certsPath *paths.Path, stdout, stderr io.Writer) (*FlashCertificatesResult, error)

FlashCertificates writes the given certificates bundle in PEM format.

func (*FwUploader) FlashFirmware

func (uploader *FwUploader) FlashFirmware(portAddress, fqbn, LogLevel string, verbose bool, firmwarePath *paths.Path, stdout, stderr io.Writer) (*FlashFirmwareResult, error)

FlashFirmware runs the plugin to flash the selected firmware

func (*FwUploader) GetFirmwareVersion

func (uploader *FwUploader) GetFirmwareVersion(portAddress, fqbn, LogLevel string, verbose bool, stdout, stderr io.Writer) (*GetFirmwareVersionResult, error)

GetFirmwareVersion runs the plugin to obtain the version of the installed firmware

func (*FwUploader) QueryAPIVersion

func (uploader *FwUploader) QueryAPIVersion() (int, error)

QueryAPIVersion queries the plugin API version

type GetFirmwareVersionResult

type GetFirmwareVersionResult struct {
	FirmwareVersion *semver.RelaxedVersion
	Error           string
	Stdout          []byte
	Stderr          []byte
}

GetFirmwareVersionResult contains the result of GetFirmwareVersion command

Jump to

Keyboard shortcuts

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