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 reachview
|
2018-09-20 17:28:18 +02:00
|
|
|
|
|
|
|
const (
|
|
|
|
eventGetConfiguration = "get configuration"
|
|
|
|
eventCurrentConfiguration = "current configuration"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Configuration fetches and return the current configuration of the ReachRS module
|
2018-09-21 12:31:52 +02:00
|
|
|
func (r *Client) Configuration() (*Configuration, error) {
|
2018-09-20 17:28:18 +02:00
|
|
|
configuration := &Configuration{}
|
2018-09-21 12:31:52 +02:00
|
|
|
if err := r.ReqResp(eventGetConfiguration, nil, eventCurrentConfiguration, configuration); err != nil {
|
2018-09-20 17:28:18 +02:00
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return configuration, nil
|
|
|
|
}
|