Documentation ¶
Index ¶
- type ArdiClient
- func (c *ArdiClient) AllBoards() []*Board
- func (c *ArdiClient) ClientVersion() string
- func (c *ArdiClient) Close()
- func (c *ArdiClient) Compile(opts CompileOpts) error
- func (c *ArdiClient) Connect() error
- func (c *ArdiClient) ConnectedBoards() []*Board
- func (c *ArdiClient) GetInstalledLibs() ([]*rpc.InstalledLibrary, error)
- func (c *ArdiClient) GetInstalledPlatforms() ([]*rpc.Platform, error)
- func (c *ArdiClient) GetPlatforms() ([]*rpc.Platform, error)
- func (c *ArdiClient) InstallLibrary(name, version string) (string, error)
- func (c *ArdiClient) InstallPlatform(platform string) (string, string, error)
- func (c *ArdiClient) SearchLibraries(query string) ([]*rpc.SearchedLibrary, error)
- func (c *ArdiClient) StartDaemon(successChan chan string, errChan chan error)
- func (c *ArdiClient) UninstallLibrary(name string) error
- func (c *ArdiClient) UninstallPlatform(platform string) (string, error)
- func (c *ArdiClient) UpdateIndexFiles() error
- func (c *ArdiClient) UpdateLibraryIndex() error
- func (c *ArdiClient) UpdatePlatformIndex() error
- func (c *ArdiClient) UpgradePlatform(platform string) error
- func (c *ArdiClient) Upload(fqbn, sketchDir, device string) error
- type Board
- type Client
- type CompileOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArdiClient ¶
type ArdiClient struct {
// contains filtered or unexported fields
}
ArdiClient represents a client connection to arduino-cli grpc daemon
func (*ArdiClient) AllBoards ¶
func (c *ArdiClient) AllBoards() []*Board
AllBoards returns a list of all supported boards
func (*ArdiClient) ClientVersion ¶
func (c *ArdiClient) ClientVersion() string
ClientVersion returns version of arduino-cli
func (*ArdiClient) Compile ¶
func (c *ArdiClient) Compile(opts CompileOpts) error
Compile the specified sketch
func (*ArdiClient) Connect ¶
func (c *ArdiClient) Connect() error
Connect connect client to grpc server
func (*ArdiClient) ConnectedBoards ¶
func (c *ArdiClient) ConnectedBoards() []*Board
ConnectedBoards returns a list of connected arduino boards
func (*ArdiClient) GetInstalledLibs ¶
func (c *ArdiClient) GetInstalledLibs() ([]*rpc.InstalledLibrary, error)
GetInstalledLibs returns a list of installed libraries
func (*ArdiClient) GetInstalledPlatforms ¶
func (c *ArdiClient) GetInstalledPlatforms() ([]*rpc.Platform, error)
GetInstalledPlatforms lists all installed platforms
func (*ArdiClient) GetPlatforms ¶
func (c *ArdiClient) GetPlatforms() ([]*rpc.Platform, error)
GetPlatforms returns specified platform or all platforms if unspecified
func (*ArdiClient) InstallLibrary ¶
func (c *ArdiClient) InstallLibrary(name, version string) (string, error)
InstallLibrary installs specified version of a library
func (*ArdiClient) InstallPlatform ¶
func (c *ArdiClient) InstallPlatform(platform string) (string, string, error)
InstallPlatform installs a given platform
func (*ArdiClient) SearchLibraries ¶
func (c *ArdiClient) SearchLibraries(query string) ([]*rpc.SearchedLibrary, error)
SearchLibraries searches available libraries for download
func (*ArdiClient) StartDaemon ¶
func (c *ArdiClient) StartDaemon(successChan chan string, errChan chan error)
StartDaemon starts the arduino-cli grpc server locally
func (*ArdiClient) UninstallLibrary ¶
func (c *ArdiClient) UninstallLibrary(name string) error
UninstallLibrary removes specified library
func (*ArdiClient) UninstallPlatform ¶
func (c *ArdiClient) UninstallPlatform(platform string) (string, error)
UninstallPlatform installs a given platform
func (*ArdiClient) UpdateIndexFiles ¶
func (c *ArdiClient) UpdateIndexFiles() error
UpdateIndexFiles updates platform and library index files
func (*ArdiClient) UpdateLibraryIndex ¶
func (c *ArdiClient) UpdateLibraryIndex() error
UpdateLibraryIndex updates library index file
func (*ArdiClient) UpdatePlatformIndex ¶
func (c *ArdiClient) UpdatePlatformIndex() error
UpdatePlatformIndex updates platform index file
func (*ArdiClient) UpgradePlatform ¶
func (c *ArdiClient) UpgradePlatform(platform string) error
UpgradePlatform upgrades a given platform
func (*ArdiClient) Upload ¶
func (c *ArdiClient) Upload(fqbn, sketchDir, device string) error
Upload a sketch to target board
type Client ¶
type Client interface { StartDaemon(s chan string, e chan error) Connect() error Close() UpdateIndexFiles() error UpdateLibraryIndex() error UpdatePlatformIndex() error UpgradePlatform(platform string) error InstallPlatform(platform string) (string, string, error) UninstallPlatform(platform string) (string, error) GetInstalledPlatforms() ([]*rpc.Platform, error) GetPlatforms() ([]*rpc.Platform, error) ConnectedBoards() []*Board AllBoards() []*Board Upload(fqbn, sketchDir, device string) error Compile(o CompileOpts) error SearchLibraries(query string) ([]*rpc.SearchedLibrary, error) InstallLibrary(name, version string) (string, error) UninstallLibrary(name string) error GetInstalledLibs() ([]*rpc.InstalledLibrary, error) ClientVersion() string }
Client reprents our wrapper around the arduino-cli rpc client