th7/api/util.go
2023-12-12 21:07:04 +00:00

23 lines
375 B
Go

package api
import "time"
type PostRequest struct {
Key string `form:"key" binding:"required"`
Value string `form:"value" binding:"required"`
}
var (
channelKeys = []string{
"thermocouple", "gain", "offset",
}
deviceKeys = []string{
"debug", "nolog", "noweb", "led",
}
)
func (g *GinAdapter) getTimestamp() string {
return time.Now().Format(time.RFC1123)
}