all: Hide implementations behind interfaces for mocked testing (#5548)

* lib/model: Hide implementations behind interfaces for mocked testing

* review
This commit is contained in:
Simon Frei
2019-02-26 09:09:25 +01:00
committed by Audrius Butkevicius
parent 8a05492622
commit 722b3fce6a
30 changed files with 405 additions and 270 deletions

View File

@@ -23,7 +23,7 @@ import (
// setup/renewal of a port mapping.
type Service struct {
id protocol.DeviceID
cfg *config.Wrapper
cfg config.Wrapper
stop chan struct{}
mappings []*Mapping
@@ -31,7 +31,7 @@ type Service struct {
mut sync.RWMutex
}
func NewService(id protocol.DeviceID, cfg *config.Wrapper) *Service {
func NewService(id protocol.DeviceID, cfg config.Wrapper) *Service {
return &Service{
id: id,
cfg: cfg,