Documentation ¶
Index ¶
- func FromDashboard(dashboard *iotclient.ArduinoDashboardv2) map[string]interface{}
- func FromThing(thing *iotclient.ArduinoThing) map[string]interface{}
- func LoadDashboard(ctx context.Context, file string, override map[string]string, ...) (*iotclient.Dashboardv2, error)
- func LoadThing(file string) (*iotclient.ThingCreate, error)
- func ToFile(template map[string]interface{}, outfile string, format string) error
- type ThingFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromDashboard ¶
func FromDashboard(dashboard *iotclient.ArduinoDashboardv2) map[string]interface{}
FromDashboard extracts a template of type map[string]interface{} from a dashboard.
func FromThing ¶
func FromThing(thing *iotclient.ArduinoThing) map[string]interface{}
FromThing extracts a template of type map[string]interface{} from a thing.
func LoadDashboard ¶
func LoadDashboard(ctx context.Context, file string, override map[string]string, thinger ThingFetcher) (*iotclient.Dashboardv2, error)
LoadDashboard loads a dashboard from a dashboard template file. It applies the thing overrides specified by the override parameter. It requires a ThingFetcher to retrieve the actual variable ids.
Types ¶
type ThingFetcher ¶
type ThingFetcher interface {
ThingShow(ctx context.Context, id string) (*iotclient.ArduinoThing, error)
}
ThingFetcher wraps the method to fetch a thing given its id.
Click to show internal directories.
Click to hide internal directories.