go-emlid/reach/client/protocol/v2/model/updater.go

56 lines
1.3 KiB
Go
Raw Normal View History

2024-07-30 14:28:39 +02:00
package model
// {
// "allowance": {
// "allowed": true,
// "reason": null
// },
// "downgrade": {
// "available": false,
// "reason": "no_available_downgrades"
// },
// "release": {
// "channel": "stable"
// },
// "update_server": {
// "address": "https://update-provider.cloud.emlid.com/api/client/v1/firmware-available"
// },
// "upgrade": {
// "available": false,
// "reason": "up_to_date",
// "required": false
// }
// }
type Updater struct {
Allowance Allowance `json:"allowance,omitempty"`
Downgrade Downgrade `json:"downgrade,omitempty"`
Release Release `json:"release,omitempty"`
UpdateServer UpdateServer `json:"update_server,omitempty"`
Upgrade Upgrade `json:"upgrade,omitempty"`
}
type Allowance struct {
Allowed bool `json:"allowed,omitempty"`
Reason any `json:"reason,omitempty"`
}
type Downgrade struct {
Available bool `json:"available,omitempty"`
Reason string `json:"reason,omitempty"`
}
type Release struct {
Channel string `json:"channel,omitempty"`
}
type UpdateServer struct {
Address string `json:"address,omitempty"`
}
type Upgrade struct {
Available bool `json:"available,omitempty"`
Reason string `json:"reason,omitempty"`
Required bool `json:"required,omitempty"`
}