Documentation ¶ Index ¶ type Plant type Plants func NewPlants(db *gorm.DB) *Plants func (p *Plants) Add(plant *Plant) (err error) func (p *Plants) Delete(ID int) (err error) func (p *Plants) Update(plant *Plant) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Plant ¶ type Plant struct { gorm.Model Ip string `gorm:"size:15;unique;not null" json:"Ip"` Humidity int `json:"Humidity"` NeedWater bool `json:"NeedWater"` Threshhold int `json:"Threshhold"` } type Plants ¶ type Plants struct { // contains filtered or unexported fields } func NewPlants ¶ func NewPlants(db *gorm.DB) *Plants func (*Plants) Add ¶ func (p *Plants) Add(plant *Plant) (err error) func (*Plants) Delete ¶ func (p *Plants) Delete(ID int) (err error) func (*Plants) Update ¶ func (p *Plants) Update(plant *Plant) error Source Files ¶ View all Source files plant.go Click to show internal directories. Click to hide internal directories.