Documentation
¶
Index ¶
- type Component
- type Frameworks
- type Manifest
- type Project
- func (p *Project) Attach(device string, out io.Writer, in io.Reader) error
- func (p *Project) Build(clean, reconfigure, appOnly bool, out io.Writer) error
- func (p *Project) Bundle(file string, out io.Writer) error
- func (p *Project) Config(file, device, baudRate string, out io.Writer) error
- func (p *Project) Exec(cmd string, out io.Writer, in io.Reader) error
- func (p *Project) Flash(device, baudRate string, erase bool, appOnly, alt bool, out io.Writer) error
- func (p *Project) Format(out io.Writer) error
- func (p *Project) Install(force bool, out io.Writer) error
- func (p *Project) SaveManifest() error
- func (p *Project) Tree() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
Path string `json:"path"`
Registry string `json:"registry"`
Repository string `json:"repository"`
Version string `json:"version"`
}
A Component represents an installable component.
type Frameworks ¶ added in v0.10.0
type Frameworks struct {
Audio string `json:"audio,omitempty"`
}
Frameworks represents the official frameworks.
type Manifest ¶ added in v0.14.0
type Manifest struct {
Name string `json:"name"`
Version string `json:"version"`
Target string `json:"target"`
BaudRate string `json:"baud_rate,omitempty"`
TagPrefix string `json:"tag_prefix,omitempty"`
Embeds []string `json:"embeds"`
Overrides map[string]string `json:"overrides"`
Partitions *tree.Partitions `json:"partitions"`
Components map[string]*Component `json:"components"`
Frameworks Frameworks `json:"frameworks,omitempty"`
}
A Manifest represents the contents of the manifest file.
func NewManifest ¶ added in v0.14.0
func NewManifest() *Manifest
NewManifest creates a new Manifest.
func ReadManifest ¶ added in v0.14.0
ReadManifest will attempt to read the manifest file at the specified path.
type Project ¶
A Project is a project available on disk.
func CreateProject ¶
CreateProject will initialize a project in the specified directory. If out is not nil, it will be used to log information about the process.
func OpenProject ¶
OpenProject will open the project in the specified path.
func (*Project) Config ¶ added in v0.8.0
Config will write settings and parameters to an attached device.
func (*Project) Flash ¶
func (p *Project) Flash(device, baudRate string, erase bool, appOnly, alt bool, out io.Writer) error
Flash will flash the project to the attached device.
func (*Project) Format ¶
Format will format all source files in the project if 'clang-format' is available.
func (*Project) Install ¶
Install will download necessary dependencies. Any existing dependencies will be removed if force is set to true. If out is not nil, it will be used to log information about the process.
func (*Project) SaveManifest ¶ added in v0.14.0
SaveManifest will save the associated manifest to disk.