parser.go 299 B

1234567891011121314
  1. package parser
  2. // Measurement provides an interface for each reading
  3. type Measurement struct {
  4. // ID of the sensor
  5. ID int
  6. // Temperature in celcius
  7. Temperature float64
  8. }
  9. // Parser provides an interface for parsing temperature strings
  10. type Parser interface {
  11. Measure() (*Measurement, error)
  12. }