20 lines
506 B
Go
20 lines
506 B
Go
|
package updater
|
||
|
|
||
|
const (
|
||
|
eventGetReachViewVersion = "get reachview version"
|
||
|
eventReachViewVersionResults = "current reachview version"
|
||
|
)
|
||
|
|
||
|
type reachViewVersion struct {
|
||
|
Version string `json:"version"`
|
||
|
}
|
||
|
|
||
|
// ReachViewVersion returns the ReachRS module ReachView version
|
||
|
func (c *Client) ReachViewVersion() (string, error) {
|
||
|
res := &reachViewVersion{}
|
||
|
if err := c.ReqResp(eventGetReachViewVersion, nil, eventReachViewVersionResults, res); err != nil {
|
||
|
return "", err
|
||
|
}
|
||
|
return res.Version, nil
|
||
|
}
|