mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-12-04 14:46:37 -05:00
Extended System interface with GetConfig/SetConfig
This commit is contained in:
parent
96364d8735
commit
f8caeaeda9
@ -10,6 +10,8 @@ import (
|
||||
)
|
||||
|
||||
type System interface {
|
||||
GetConfig() map[string]interface{}
|
||||
SetConfig(cfg *map[string]interface{})
|
||||
GetCapabilities() []adapter.Capability
|
||||
|
||||
Load() error
|
||||
@ -29,6 +31,7 @@ func New(sysType string, sysConfig *map[string]interface{}) (System, error) {
|
||||
return nil, errors.New("No such system")
|
||||
}
|
||||
|
||||
sys.SetConfig(sysConfig)
|
||||
err := sys.Load()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user