models

package
v0.0.0-...-4d43585 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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