commands

package
v0.0.0-...-20dd7c9 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: GPL-3.0 Imports: 26 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(req *rpc.CreateRequest, extraUserAgent ...string) (*rpc.CreateResponse, error)

Create a new CoreInstance ready to be initialized, supporting directories are also created.

func Destroy

func Destroy(ctx context.Context, req *rpc.DestroyRequest) (*rpc.DestroyResponse, error)

Destroy FIXMEDOC

func GetLibraryManager

func GetLibraryManager(req rpc.InstanceCommand) *librariesmanager.LibrariesManager

GetLibraryManager returns the library manager for the given instance.

func GetPackageManager

func GetPackageManager(instance rpc.InstanceCommand) *packagemanager.PackageManager

GetPackageManager returns a PackageManager. If the package manager is not found (because the instance is invalid or has been destroyed), nil is returned. Deprecated: use GetPackageManagerExplorer instead.

func GetPackageManagerExplorer

func GetPackageManagerExplorer(req rpc.InstanceCommand) (explorer *packagemanager.Explorer, release func())

GetPackageManagerExplorer returns a new package manager Explorer. The explorer holds a read lock on the underlying PackageManager and it should be released by calling the returned "release" function.

func Init

func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) error

Init loads installed libraries and Platforms in CoreInstance with specified ID, a gRPC status error is returned if the CoreInstance doesn't exist. All responses are sent through responseCallback, can be nil to ignore all responses. Failures don't stop the loading process, in case of loading failure the Platform or library is simply skipped and an error gRPC status is sent to responseCallback.

func LoadSketch

LoadSketch collects and returns all files composing a sketch

func ParseVersion

func ParseVersion(req Versioned) (*semver.Version, error)

ParseVersion returns the version parsed from an interface that provides the GetVersion() method (interface Versioned)

func PlatformReleaseToRPC

func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.Platform

PlatformReleaseToRPC converts our internal structure to the RPC structure. Note: this function does not touch the "Installed" field of rpc.Platform as it's not always clear that the platformRelease we're currently converting is actually installed.

func UpdateIndex

func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rpc.DownloadProgressCB) error

UpdateIndex FIXMEDOC

func UpdateLibrariesIndex

func UpdateLibrariesIndex(ctx context.Context, req *rpc.UpdateLibrariesIndexRequest, downloadCB rpc.DownloadProgressCB) error

UpdateLibrariesIndex updates the library_index.json

Types

type CoreInstance

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

CoreInstance is an instance of the Arduino Core Services. The user can instantiate as many as needed by providing a different configuration for each one.

type Versioned

type Versioned interface {
	GetVersion() string
}

Versioned is an object that provides a GetVersion() method

Directories

Path Synopsis
term_example command

Jump to

Keyboard shortcuts

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