controller

package
v0.0.0-...-a79553f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDevice

type MockDevice struct {
	mock.Mock
}

func (*MockDevice) Name

func (f *MockDevice) Name() string

func (*MockDevice) Number

func (f *MockDevice) Number() int

func (*MockDevice) Off

func (f *MockDevice) Off()

func (*MockDevice) On

func (f *MockDevice) On()

func (*MockDevice) ReadMoisture

func (f *MockDevice) ReadMoisture(tries int) (float32, error)

func (*MockDevice) ReadTempHumidity

func (f *MockDevice) ReadTempHumidity() (float32, float32, error)

func (*MockDevice) SensorTypeInfo

func (f *MockDevice) SensorTypeInfo() sensors.SensorTypeInfo

func (*MockDevice) State

func (f *MockDevice) State() (bool, error)

func (*MockDevice) TypeInfo

func (f *MockDevice) TypeInfo() relay.DeviceTypeInfo

type Opts

type Opts func(service *Service)

func WithDisplayService

func WithDisplayService(displayService *display.Service) Opts

func WithMetricsService

func WithMetricsService(metricService *measurement.Service) Opts

func WithPinService

func WithPinService(pinService *pin.Service) Opts

func WithRelayService

func WithRelayService(relayService *relay.Service) Opts

func WithSensorService

func WithSensorService(sensorService *sensors.Service) Opts

type Service

type Service struct {
	Display *display.Service
	Metrics *measurement.Service
	Pins    *pin.Service
	Relays  *relay.Service
	Sensors *sensors.Service
}

func New

func New(opts ...Opts) *Service

func (*Service) FanControl

func (c *Service) FanControl()

func (*Service) LightsControl

func (c *Service) LightsControl()

func (*Service) WaterControl

func (c *Service) WaterControl()

func (*Service) WaterDisplayView

func (c *Service) WaterDisplayView() display.Page

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL