You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
452 B
Go
29 lines
452 B
Go
6 years ago
|
package hns
|
||
|
|
||
|
type HNSGlobals struct {
|
||
|
Version HNSVersion `json:"Version"`
|
||
|
}
|
||
|
|
||
|
type HNSVersion struct {
|
||
|
Major int `json:"Major"`
|
||
|
Minor int `json:"Minor"`
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
HNSVersion1803 = HNSVersion{Major: 7, Minor: 2}
|
||
|
)
|
||
|
|
||
|
func GetHNSGlobals() (*HNSGlobals, error) {
|
||
|
var version HNSVersion
|
||
|
err := hnsCall("GET", "/globals/version", "", &version)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
globals := &HNSGlobals{
|
||
|
Version: version,
|
||
|
}
|
||
|
|
||
|
return globals, nil
|
||
|
}
|