Documentation
¶
Index ¶
- type Board
- func (b *Board) FQBN() string
- func (b *Board) GeneratePropertiesForConfiguration(config string) (*properties.Map, error)
- func (b *Board) GetBuildProperties(userConfigs *properties.Map) (*properties.Map, error)
- func (b *Board) GetConfigOptionValues(option string) *properties.Map
- func (b *Board) GetConfigOptions() *properties.Map
- func (b *Board) HasUsbID(reqVid, reqPid string) bool
- func (b *Board) Name() string
- func (b *Board) String() string
- type BoardManifest
- type BoardManifestID
- type FQBN
- type Flavor
- type Package
- type Packages
- type Platform
- func (platform *Platform) FindReleaseWithVersion(version *semver.Version) *PlatformRelease
- func (platform *Platform) GetAllInstalled() []*PlatformRelease
- func (platform *Platform) GetAllReleasesVersions() []*semver.Version
- func (platform *Platform) GetLatestRelease() *PlatformRelease
- func (platform *Platform) GetOrCreateRelease(version *semver.Version) (*PlatformRelease, error)
- func (platform *Platform) String() string
- type PlatformRelease
- func (release *PlatformRelease) GetLibrariesDir() *paths.Path
- func (release *PlatformRelease) GetOrCreateBoard(boardID string) *Board
- func (release *PlatformRelease) IsInstalled() bool
- func (release *PlatformRelease) RequiresToolRelease(toolRelease *ToolRelease) bool
- func (release *PlatformRelease) RuntimeProperties() *properties.Map
- func (release *PlatformRelease) String() string
- type Tool
- func (tool *Tool) FindReleaseWithRelaxedVersion(version *semver.RelaxedVersion) *ToolRelease
- func (tool *Tool) GetAllReleasesVersions() []*semver.RelaxedVersion
- func (tool *Tool) GetLatestInstalled() *ToolRelease
- func (tool *Tool) GetOrCreateRelease(version *semver.RelaxedVersion) *ToolRelease
- func (tool *Tool) LatestRelease() *ToolRelease
- func (tool *Tool) String() string
- type ToolDependencies
- type ToolDependency
- type ToolRelease
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Board struct { BoardID string Properties *properties.Map `json:"-"` PlatformRelease *PlatformRelease `json:"-"` }
Board represents a board loaded from an installed platform
func (*Board) FQBN ¶
FQBN return the Fully-Qualified-Board-Name for the default configuration of this board
func (*Board) GeneratePropertiesForConfiguration ¶
GeneratePropertiesForConfiguration returns the board properties for a particular configuration. The parameter is the latest part of the FQBN, for example if the full FQBN is "arduino:avr:mega:cpu=atmega2560" the config part must be "cpu=atmega2560". FIXME: deprecated, use GetBuildProperties instead
func (*Board) GetBuildProperties ¶
GetBuildProperties returns the build properties and the build platform for the Board with the configuration passed as parameter.
func (*Board) GetConfigOptionValues ¶
GetConfigOptionValues returns an OrderedMap of possible values for a specific configuratio options for this board. The returned map will have key and value as option value and option value name, respectively.
func (*Board) GetConfigOptions ¶
func (b *Board) GetConfigOptions() *properties.Map
GetConfigOptions returns an OrderedMap of configuration options for this board. The returned map will have key and value as option id and option name, respectively.
type BoardManifest ¶
type BoardManifest struct { Name string `json:"-"` ID []*BoardManifestID `json:"-"` }
BoardManifest contains information about a board. These metadata are usually provided by the package_index.json
func (*BoardManifest) HasUsbID ¶
func (bm *BoardManifest) HasUsbID(vid, pid string) bool
HasUsbID returns true if the BoardManifes contains the specified USB id as identification for this board. usbID should be in the format "0000:0000"
type BoardManifestID ¶
type BoardManifestID struct {
USB string `json:"-"`
}
BoardManifestID contains information on how to identify a board. These metadata are usually provided by the package_index.json
type FQBN ¶
type FQBN struct { Package string PlatformArch string BoardID string Configs *properties.Map }
FQBN represents a Board with a specific configuration
type Flavor ¶
type Flavor struct { OS string `json:"os,required"` // The OS Supported by this flavor. Resource *resources.DownloadResource }
Flavor represents a flavor of a Tool version.
type Package ¶
type Package struct { Name string // Name of the package. Maintainer string // Name of the maintainer. WebsiteURL string // Website of maintainer. Email string // Email of maintainer. Platforms map[string]*Platform // The platforms in the system. Tools map[string]*Tool // The tools in the system. Packages *Packages `json:"-"` }
Package represents a package in the system.
func (*Package) GetOrCreatePlatform ¶
GetOrCreatePlatform returns the Platform object with the specified architecture or creates a new one if not found
func (*Package) GetOrCreateTool ¶
GetOrCreateTool returns the Tool object with the specified name or creates a new one if not found
type Packages ¶
Packages represents a set of Packages
func (*Packages) GetDepsOfPlatformRelease ¶
func (packages *Packages) GetDepsOfPlatformRelease(release *PlatformRelease) ([]*ToolRelease, error)
GetDepsOfPlatformRelease returns the deps of a specified release of a core.
func (*Packages) GetOrCreatePackage ¶
GetOrCreatePackage returns the specified Package or create an empty one filling all the cross-references
type Platform ¶
type Platform struct { Architecture string // The name of the architecture of this package. Name string Category string Releases map[string]*PlatformRelease // The Releases of this platform, labeled by version. Package *Package `json:"-"` }
Platform represents a platform package.
func (*Platform) FindReleaseWithVersion ¶
func (platform *Platform) FindReleaseWithVersion(version *semver.Version) *PlatformRelease
FindReleaseWithVersion returns the specified release corresponding the provided version, or nil if not found.
func (*Platform) GetAllInstalled ¶
func (platform *Platform) GetAllInstalled() []*PlatformRelease
GetAllInstalled returns all installed PlatformRelease
func (*Platform) GetAllReleasesVersions ¶
func (platform *Platform) GetAllReleasesVersions() []*semver.Version
GetAllReleasesVersions returns all the version numbers in this Platform Package.
func (*Platform) GetLatestRelease ¶
func (platform *Platform) GetLatestRelease() *PlatformRelease
GetLatestRelease returns the latest release of this platform, or nil if no releases are available
func (*Platform) GetOrCreateRelease ¶
func (platform *Platform) GetOrCreateRelease(version *semver.Version) (*PlatformRelease, error)
GetOrCreateRelease returns the specified release corresponding the provided version, or creates a new one if not found.
type PlatformRelease ¶
type PlatformRelease struct { Resource *resources.DownloadResource Version *semver.Version BoardsManifest []*BoardManifest Dependencies ToolDependencies // The Dependency entries to load tools. Platform *Platform `json:"-"` Properties *properties.Map `json:"-"` Boards map[string]*Board `json:"-"` Programmers map[string]*properties.Map `json:"-"` Menus *properties.Map `json:"-"` InstallDir *paths.Path `json:"-"` }
PlatformRelease represents a release of a plaform package.
func (*PlatformRelease) GetLibrariesDir ¶
func (release *PlatformRelease) GetLibrariesDir() *paths.Path
GetLibrariesDir returns the path to the core libraries or nil if not present
func (*PlatformRelease) GetOrCreateBoard ¶
func (release *PlatformRelease) GetOrCreateBoard(boardID string) *Board
GetOrCreateBoard returns the Board object with the specified boardID or creates a new one if not found
func (*PlatformRelease) IsInstalled ¶
func (release *PlatformRelease) IsInstalled() bool
IsInstalled returns true if the PlatformRelease is installed
func (*PlatformRelease) RequiresToolRelease ¶
func (release *PlatformRelease) RequiresToolRelease(toolRelease *ToolRelease) bool
RequiresToolRelease returns true if the PlatformRelease requires the toolReleased passed as parameter
func (*PlatformRelease) RuntimeProperties ¶
func (release *PlatformRelease) RuntimeProperties() *properties.Map
RuntimeProperties returns the runtime properties for this PlatformRelease
func (*PlatformRelease) String ¶
func (release *PlatformRelease) String() string
type Tool ¶
type Tool struct { Name string `json:"name,required"` // The Name of the Tool. Releases map[string]*ToolRelease `json:"releases"` // Maps Version to Release. Package *Package `json:"-"` }
Tool represents a single Tool, part of a Package.
func (*Tool) FindReleaseWithRelaxedVersion ¶
func (tool *Tool) FindReleaseWithRelaxedVersion(version *semver.RelaxedVersion) *ToolRelease
FindReleaseWithRelaxedVersion returns the specified release corresponding the provided version, or nil if not found.
func (*Tool) GetAllReleasesVersions ¶
func (tool *Tool) GetAllReleasesVersions() []*semver.RelaxedVersion
GetAllReleasesVersions returns all the version numbers in this Core Package.
func (*Tool) GetLatestInstalled ¶
func (tool *Tool) GetLatestInstalled() *ToolRelease
GetLatestInstalled returns the latest installed ToolRelease for the Tool, or nil if no releases are installed.
func (*Tool) GetOrCreateRelease ¶
func (tool *Tool) GetOrCreateRelease(version *semver.RelaxedVersion) *ToolRelease
GetOrCreateRelease returns the ToolRelease object with the specified version or creates a new one if not found
func (*Tool) LatestRelease ¶
func (tool *Tool) LatestRelease() *ToolRelease
LatestRelease obtains latest version of a core package.
type ToolDependencies ¶
type ToolDependencies []*ToolDependency
ToolDependencies is a set of tool dependency
type ToolDependency ¶
type ToolDependency struct { ToolName string ToolVersion *semver.RelaxedVersion ToolPackager string }
ToolDependency is a tuple that uniquely identifies a specific version of a Tool
func (*ToolDependency) String ¶
func (dep *ToolDependency) String() string
type ToolRelease ¶
type ToolRelease struct { Version *semver.RelaxedVersion `json:"version,required"` // The version number of this Release. Flavors []*Flavor `json:"systems"` // Maps OS to Flavor Tool *Tool `json:"-"` InstallDir *paths.Path `json:"-"` }
ToolRelease represents a single release of a tool
func (*ToolRelease) GetCompatibleFlavour ¶
func (tr *ToolRelease) GetCompatibleFlavour() *resources.DownloadResource
GetCompatibleFlavour returns the downloadable resource compatible with the running O.S.
func (*ToolRelease) IsInstalled ¶
func (tr *ToolRelease) IsInstalled() bool
IsInstalled returns true if the ToolRelease is installed
func (*ToolRelease) RuntimeProperties ¶
func (tr *ToolRelease) RuntimeProperties() *properties.Map
RuntimeProperties returns the runtime properties for this tool
func (*ToolRelease) String ¶
func (tr *ToolRelease) String() string