Documentation
¶
Index ¶
- Variables
- type AppBrickInstancesResult
- type AppReference
- type BrickCreateUpdateRequest
- type BrickDetailsResult
- type BrickInstance
- type BrickListItem
- type BrickListResult
- type BrickVariable
- type CodeExample
- type Service
- func (s *Service) AppBrickInstanceDetails(a *app.ArduinoApp, brickID string) (BrickInstance, error)
- func (s *Service) AppBrickInstancesList(a *app.ArduinoApp) (AppBrickInstancesResult, error)
- func (s *Service) BrickCreate(req BrickCreateUpdateRequest, appCurrent app.ArduinoApp) error
- func (s *Service) BrickDelete(appCurrent *app.ArduinoApp, id string) error
- func (s *Service) BrickUpdate(req BrickCreateUpdateRequest, appCurrent app.ArduinoApp) error
- func (s *Service) BricksDetails(id string) (BrickDetailsResult, error)
- func (s *Service) List() (BrickListResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBrickNotFound = errors.New("brick not found") ErrCannotSaveBrick = errors.New("cannot save brick instance") )
Functions ¶
This section is empty.
Types ¶
type AppBrickInstancesResult ¶
type AppBrickInstancesResult struct {
BrickInstances []BrickInstance `json:"bricks"`
}
type AppReference ¶
type BrickDetailsResult ¶
type BrickDetailsResult struct {
ID string `json:"id"`
Name string `json:"name"`
Author string `json:"author"`
Description string `json:"description"`
Category string `json:"category"`
Status string `json:"status"`
Variables map[string]BrickVariable `json:"variables,omitempty"`
Readme string `json:"readme"`
ApiDocsPath string `json:"api_docs_path"`
CodeExamples []CodeExample `json:"code_examples"`
UsedByApps []AppReference `json:"used_by_apps"`
}
type BrickInstance ¶
type BrickListItem ¶
type BrickListResult ¶
type BrickListResult struct {
Bricks []BrickListItem `json:"bricks"`
}
type BrickVariable ¶
type CodeExample ¶
type CodeExample struct {
Path string `json:"path"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( modelsIndex *modelsindex.ModelsIndex, bricksIndex *bricksindex.BricksIndex, staticStore *store.StaticStore, ) *Service
func (*Service) AppBrickInstanceDetails ¶
func (s *Service) AppBrickInstanceDetails(a *app.ArduinoApp, brickID string) (BrickInstance, error)
func (*Service) AppBrickInstancesList ¶
func (s *Service) AppBrickInstancesList(a *app.ArduinoApp) (AppBrickInstancesResult, error)
func (*Service) BrickCreate ¶
func (s *Service) BrickCreate( req BrickCreateUpdateRequest, appCurrent app.ArduinoApp, ) error
func (*Service) BrickDelete ¶
func (s *Service) BrickDelete( appCurrent *app.ArduinoApp, id string, ) error
func (*Service) BrickUpdate ¶
func (s *Service) BrickUpdate( req BrickCreateUpdateRequest, appCurrent app.ArduinoApp, ) error
func (*Service) BricksDetails ¶
func (s *Service) BricksDetails(id string) (BrickDetailsResult, error)
func (*Service) List ¶
func (s *Service) List() (BrickListResult, error)
Click to show internal directories.
Click to hide internal directories.