Documentation
¶
Index ¶
- Constants
- func GetKitNames() []string
- type AquaponicsKitV1
- func (e *AquaponicsKitV1) GenerateCode(project *model.Project, sensor *model.Sensor) (string, error)
- func (e *AquaponicsKitV1) Init() error
- func (e *AquaponicsKitV1) Monitor(ctx context.Context) error
- func (e *AquaponicsKitV1) Name() string
- func (e *AquaponicsKitV1) SetPath(path string) error
- func (e *AquaponicsKitV1) SetPort(port string)
- func (e *AquaponicsKitV1) Upload() error
- type HydroponicsKitV2
- func (e *HydroponicsKitV2) GenerateCode(project *model.Project, sensor *model.Sensor) (string, error)
- func (e *HydroponicsKitV2) Init() error
- func (e *HydroponicsKitV2) Monitor(ctx context.Context) error
- func (e *HydroponicsKitV2) Name() string
- func (e *HydroponicsKitV2) SetPath(path string) error
- func (e *HydroponicsKitV2) SetPort(port string)
- func (e *HydroponicsKitV2) Upload() error
- type Kit
- type KitConstructor
Constants ¶
View Source
const IotEndpoint = "iot.farmhub.ag"
Variables ¶
This section is empty.
Functions ¶
func GetKitNames ¶
func GetKitNames() []string
GetKitNames returns a list of available kit names to be used in lists and interactive menus
Types ¶
type AquaponicsKitV1 ¶ added in v1.3.0
type AquaponicsKitV1 struct {
// contains filtered or unexported fields
}
func (*AquaponicsKitV1) GenerateCode ¶ added in v1.5.0
func (*AquaponicsKitV1) Init ¶ added in v1.3.0
func (e *AquaponicsKitV1) Init() error
func (*AquaponicsKitV1) Monitor ¶ added in v1.3.0
func (e *AquaponicsKitV1) Monitor(ctx context.Context) error
func (*AquaponicsKitV1) Name ¶ added in v1.5.0
func (e *AquaponicsKitV1) Name() string
func (*AquaponicsKitV1) SetPath ¶ added in v1.3.0
func (e *AquaponicsKitV1) SetPath(path string) error
func (*AquaponicsKitV1) SetPort ¶ added in v1.3.0
func (e *AquaponicsKitV1) SetPort(port string)
func (*AquaponicsKitV1) Upload ¶ added in v1.3.0
func (e *AquaponicsKitV1) Upload() error
type HydroponicsKitV2 ¶ added in v1.3.0
type HydroponicsKitV2 struct {
// contains filtered or unexported fields
}
func (*HydroponicsKitV2) GenerateCode ¶ added in v1.5.0
func (*HydroponicsKitV2) Init ¶ added in v1.3.0
func (e *HydroponicsKitV2) Init() error
func (*HydroponicsKitV2) Monitor ¶ added in v1.3.0
func (e *HydroponicsKitV2) Monitor(ctx context.Context) error
func (*HydroponicsKitV2) Name ¶ added in v1.5.0
func (e *HydroponicsKitV2) Name() string
func (*HydroponicsKitV2) SetPath ¶ added in v1.3.0
func (e *HydroponicsKitV2) SetPath(path string) error
func (*HydroponicsKitV2) SetPort ¶ added in v1.3.0
func (e *HydroponicsKitV2) SetPort(port string)
func (*HydroponicsKitV2) Upload ¶ added in v1.3.0
func (e *HydroponicsKitV2) Upload() error
type Kit ¶
type Kit interface { // The name of the kit, used to create one if doesnt exist Name() string // SetPort specifies where it should be operating when flashing and monitoring SetPort(port string) // SetPath specifies the path to the sketch to be flashed SetPath(path string) error // Init initializes the kit, installing libraries and other dependencies Init() error // Upload flashes the sketch to the specified port Upload() error // GenerateCode generates the code necessary for this kit GenerateCode(project *model.Project, sensor *model.Sensor) (string, error) // Monitor starts monitoring the specified port Monitor(ctx context.Context) error }
func GetKitByName ¶
GetKitByName returns a new kit instance by its name
func NewAquaponicsKitV1 ¶ added in v1.3.0
func NewAquaponicsKitV1() Kit
func NewHydroponicsKitV2 ¶ added in v1.3.0
func NewHydroponicsKitV2() Kit
type KitConstructor ¶
type KitConstructor func() Kit
KitConstructor is a function that returns a new Kit and allows them to be registered in the map below without initializing them immediately
Click to show internal directories.
Click to hide internal directories.