This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
2018-09-21 12:31:52 +02:00
|
|
|
package updater
|
|
|
|
|
2018-09-26 12:05:55 +02:00
|
|
|
import "context"
|
|
|
|
|
2018-09-21 12:31:52 +02:00
|
|
|
const (
|
|
|
|
eventGetTestResults = "get test results"
|
|
|
|
eventTestResults = "test results"
|
|
|
|
)
|
|
|
|
|
|
|
|
// TestResults are the ReachRS module's test results
|
|
|
|
//
|
|
|
|
type TestResults struct {
|
|
|
|
Device string `json:"device"`
|
|
|
|
Lora bool `json:"lora"`
|
|
|
|
MPU bool `json:"mpu"`
|
|
|
|
STC bool `json:"stc"`
|
|
|
|
UBlox bool `json:"u-blox"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// TestResults returns the ReachRS module tests results
|
2018-09-26 12:05:55 +02:00
|
|
|
func (c *Client) TestResults(ctx context.Context) (*TestResults, error) {
|
2018-09-21 12:31:52 +02:00
|
|
|
res := &TestResults{}
|
2018-09-26 12:05:55 +02:00
|
|
|
if err := c.ReqResp(ctx, eventGetTestResults, nil, eventTestResults, res); err != nil {
|
2018-09-21 12:31:52 +02:00
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return res, nil
|
|
|
|
}
|