mirror of
https://gitee.com/winc-link/hummingbird.git
synced 2025-04-21 08:52:42 +00:00
26 lines
700 B
Go
26 lines
700 B
Go
package dtos
|
|
|
|
import (
|
|
//"gitlab.com/tedge/edgex/internal/models"
|
|
//"gitlab.com/tedge/edgex/proto/devicelibrary"
|
|
"github.com/winc-link/hummingbird/internal/models"
|
|
)
|
|
|
|
type DeviceLibrarySupportVersionSimple struct {
|
|
Version string `json:"version"`
|
|
IsDefault bool `json:"is_default"`
|
|
ConfigFile string `json:"config_file"`
|
|
}
|
|
|
|
func DeviceLibrarySupportVersionSimpleFromModel(versions models.SupportVersions) []DeviceLibrarySupportVersionSimple {
|
|
ret := make([]DeviceLibrarySupportVersionSimple, len(versions))
|
|
for i, v := range versions {
|
|
ret[i] = DeviceLibrarySupportVersionSimple{
|
|
Version: v.Version,
|
|
IsDefault: v.IsDefault,
|
|
//ConfigFile: v.ConfigFile,
|
|
}
|
|
}
|
|
return ret
|
|
}
|