service

package
v0.0.0-...-518c124 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = fmt.Errorf("not found")

ErrNotFound when resource is not found

Functions

This section is empty.

Types

type Controller

type Controller interface {
	GetInfo() (models.Info, error)
	GetDigitalInputs() ([]models.DigitalInput, error)
	GetDosingPumps() ([]models.DosingPump, error)
	GetLevelSensors() ([]models.LevelSensor, error)
	GetLights() ([]models.Light, error)
	GetLPorts() ([]models.LPort, error)
	GetProbes() ([]models.Probe, error)
	GetProgrammableLogics() ([]models.ProgrammableLogic, error)
	GetCurrentPumps() ([]models.CurrentPump, error)
	GetSPorts() ([]models.SPort, error)

	GetCurrentPump(id string) (models.CurrentPump, error)
	GetDigitalInput(id string) (models.DigitalInput, error)
	GetDosingPump(id string) (models.DosingPump, error)
	GetLevelSensor(id string) (models.LevelSensor, error)
	GetLight(id string) (models.Light, error)
	GetLPort(id string) (models.LPort, error)
	GetProbe(id string) (models.Probe, error)
	GetProgrammableLogic(id string) (models.ProgrammableLogic, error)
	GetSPort(id string) (models.SPort, error)

	SetInfo(info models.Info, create bool) error
	SetDigitalInput(input models.DigitalInput, create bool) error
	SetDosingPump(pump models.DosingPump, create bool) error
	SetLevelSensor(sensor models.LevelSensor, create bool) error
	SetLight(light models.Light, create bool) error
	SetLPort(port models.LPort, create bool) error
	SetProbe(probe models.Probe, create bool) error
	SetProgrammableLogic(item models.ProgrammableLogic, create bool) error
	SetCurrentPump(pump models.CurrentPump, create bool) error
	SetSPort(port models.SPort, create bool) error

	DeleteDigitalInput(input models.DigitalInput) error
	DeleteDosingPump(pump models.DosingPump) error
	DeleteLevelSensor(models.LevelSensor) error
	DeleteLight(models.Light) error
	DeleteLPort(models.LPort) error
	DeleteProbe(models.Probe) error
	DeleteProgrammableLogic(models.ProgrammableLogic) error
	DeleteCurrentPump(models.CurrentPump) error
	DeleteSPort(models.SPort) error

	UpdateAssociations() error
}

Controller interface

func NewController

func NewController(address, token string) (Controller, error)

NewController creates a new controller

Jump to

Keyboard shortcuts

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