Documentation
¶
Index ¶
- Variables
- type AppDescriptor
- type ArduinoApp
- func (a *ArduinoApp) AppComposeFilePath() *paths.Path
- func (a *ArduinoApp) AppComposeOverrideFilePath() *paths.Path
- func (a *ArduinoApp) GetDescriptorPath() *paths.Path
- func (a *ArduinoApp) ProvisioningStateDir() *paths.Path
- func (a *ArduinoApp) Save() error
- func (a *ArduinoApp) SketchBuildPath() *paths.Path
- type Brick
- type ID
- type IDProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidApp = fmt.Errorf("invalid app")
View Source
var ErrInvalidID = errors.New("not a valid id")
Functions ¶
This section is empty.
Types ¶
type AppDescriptor ¶
type AppDescriptor struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Ports []int `yaml:"ports"`
Bricks []Brick `yaml:"bricks"`
Icon string `yaml:"icon,omitempty"`
RequiredDevices []string `yaml:"required_devices,omitempty"`
}
func ParseDescriptorFile ¶
func ParseDescriptorFile(file *paths.Path) (AppDescriptor, error)
ParseAppFile reads an app file
func (*AppDescriptor) IsValid ¶
func (a *AppDescriptor) IsValid() error
func (AppDescriptor) MarshalYAML ¶
func (d AppDescriptor) MarshalYAML() (any, error)
type ArduinoApp ¶
type ArduinoApp struct {
Name string
MainPythonFile *paths.Path
MainSketchPath *paths.Path
FullPath *paths.Path // FullPath is the path to the App folder
Descriptor AppDescriptor
}
ArduinoApp holds all the files composing an app
func Load ¶
func Load(appPath string) (ArduinoApp, error)
Load creates an App instance by reading all the files composing an app and grouping them by file type.
func (*ArduinoApp) AppComposeFilePath ¶
func (a *ArduinoApp) AppComposeFilePath() *paths.Path
func (*ArduinoApp) AppComposeOverrideFilePath ¶
func (a *ArduinoApp) AppComposeOverrideFilePath() *paths.Path
func (*ArduinoApp) GetDescriptorPath ¶
func (a *ArduinoApp) GetDescriptorPath() *paths.Path
GetDescriptorPath returns the path to the app descriptor file (app.yaml or app.yml)
func (*ArduinoApp) ProvisioningStateDir ¶
func (a *ArduinoApp) ProvisioningStateDir() *paths.Path
func (*ArduinoApp) Save ¶
func (a *ArduinoApp) Save() error
func (*ArduinoApp) SketchBuildPath ¶
func (a *ArduinoApp) SketchBuildPath() *paths.Path
type Brick ¶
type ID ¶
type ID struct {
// contains filtered or unexported fields
}
func (ID) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for ID.
type IDProvider ¶
type IDProvider struct {
// contains filtered or unexported fields
}
func NewAppIDProvider ¶
func NewAppIDProvider(cfg config.Configuration) *IDProvider
func (*IDProvider) IDFromBase64 ¶
func (p *IDProvider) IDFromBase64(id string) (ID, error)
func (*IDProvider) IDFromPath ¶
func (p *IDProvider) IDFromPath(path *paths.Path) (ID, error)
Click to show internal directories.
Click to hide internal directories.