Documentation ¶
Index ¶
- Constants
- Variables
- func InitPins() error
- type Pin
- func (p *Pin) GetNextWatering() (time.Time, error)
- func (p *Pin) RunPinForDuration(dur int)
- func (p *Pin) TurnOff()
- func (p *Pin) TurnOn()
- func (p *Pin) UpdatePriorityAndNextWatering() (time.Time, error)
- func (p *Pin) UpdateTime(timeString string, updateToTime time.Time) (time.Time, error)
- func (p *Pin) Validate() bool
Constants ¶
View Source
const TimeForm = "01-02-2006 15:04"
Variables ¶
View Source
var LocationMountain, _ = time.LoadLocation("US/Mountain") //"America/Denver""Etc/GMT-7"
Functions ¶
Types ¶
type Pin ¶
type Pin struct { Id int `json:"Id"` Status bool `json:"Status"` Enabled bool `json:"Enabled"` Info string `json:"Info"` //Schedule fields NextWatering string `json:"NextWatering"` Schedules map[string]uint32 `json:"Schedules"` //PriorityQueue specific fields Index int `json:"Index"` Priority int64 `json:"Priority"` }
func (*Pin) RunPinForDuration ¶
func (*Pin) UpdatePriorityAndNextWatering ¶
func (*Pin) UpdateTime ¶
Click to show internal directories.
Click to hide internal directories.