th7/api/util.go

23 lines
375 B
Go
Raw Permalink Normal View History

2023-12-12 21:07:04 +00:00
package api
2023-12-05 17:22:12 +00:00
import "time"
type PostRequest struct {
Key string `form:"key" binding:"required"`
Value string `form:"value" binding:"required"`
}
2023-12-06 19:21:54 +00:00
var (
channelKeys = []string{
"thermocouple", "gain", "offset",
}
deviceKeys = []string{
"debug", "nolog", "noweb", "led",
}
)
2023-12-05 17:22:12 +00:00
func (g *GinAdapter) getTimestamp() string {
return time.Now().Format(time.RFC1123)
}