mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 08:46:38 +00:00
add example setup for management refactor
This commit is contained in:
19
management/refactor/settings/manager.go
Normal file
19
management/refactor/settings/manager.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package settings
|
||||
|
||||
type Manager interface {
|
||||
GetSettings(accountID string) (Settings, error)
|
||||
}
|
||||
|
||||
type DefaultManager struct {
|
||||
repository repository
|
||||
}
|
||||
|
||||
func NewDefaultManager(repository repository) *DefaultManager {
|
||||
return &DefaultManager{
|
||||
repository: repository,
|
||||
}
|
||||
}
|
||||
|
||||
func (dm *DefaultManager) GetSettings(accountID string) (Settings, error) {
|
||||
return dm.repository.FindSettings(accountID)
|
||||
}
|
||||
Reference in New Issue
Block a user