Documentation ¶
Index ¶
Constants ¶
View Source
const (
DATETIME = "2006-01-02 15:04:05 -0700 MST"
)
Variables ¶
Functions ¶
func CreateTable ¶
func Insert ¶
func Insert(db *sql.DB, sds []SerialData)
Types ¶
type SerialData ¶
type SerialData struct { Id int `json:"id"` Humidity float64 `json:"humidity"` Temperature float64 `json:"temperature"` CO float64 `json:"co"` CO2 float64 `json:"co2"` MP25 float64 `json:"mp25"` CreatedAt time.Time `json:"created_at"` }
func NewSerialData ¶
func NewSerialData(m []byte) (*SerialData, error)
func ReadAndPost ¶
func (*SerialData) DecodeAndPost ¶
func (*SerialData) Delete ¶
func (sd *SerialData) Delete(db *sql.DB)
Click to show internal directories.
Click to hide internal directories.