mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-23 02:36:42 +00:00
extend example
This commit is contained in:
21
management/refactor/resources/settings/manager.go
Normal file
21
management/refactor/resources/settings/manager.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package settings
|
||||
|
||||
import "github.com/netbirdio/netbird/management/refactor/resources/settings/types"
|
||||
|
||||
type Manager interface {
|
||||
GetSettings(accountID string) (types.Settings, error)
|
||||
}
|
||||
|
||||
type DefaultManager struct {
|
||||
repository Repository
|
||||
}
|
||||
|
||||
func NewDefaultManager(repository Repository) *DefaultManager {
|
||||
return &DefaultManager{
|
||||
repository: repository,
|
||||
}
|
||||
}
|
||||
|
||||
func (dm *DefaultManager) GetSettings(accountID string) (types.Settings, error) {
|
||||
return dm.repository.FindSettings(accountID)
|
||||
}
|
||||
Reference in New Issue
Block a user