iot-relay/internal/types/request.go
2021-11-14 12:17:47 +01:00

22 lines
292 B
Go

package types
type Request struct {
ID string
Location string
IP string
Data map[string]string
}
func (r Request) IsValid() bool {
if len(r.IP) == 0 {
return false
}
if len(r.ID) == 0 {
return false
}
if len(r.Location) == 0 {
return false
}
return true
}