mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 00:36:38 +00:00
add example setup for management refactor
This commit is contained in:
34
management/refactor/settings/settings.go
Normal file
34
management/refactor/settings/settings.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package settings
|
||||
|
||||
import "time"
|
||||
|
||||
type Settings interface {
|
||||
GetLicense() string
|
||||
GetPeerLoginExpiration() time.Duration
|
||||
SetPeerLoginExpiration(duration time.Duration)
|
||||
GetPeerLoginExpirationEnabled() bool
|
||||
SetPeerLoginExpirationEnabled(bool)
|
||||
}
|
||||
|
||||
type DefaultSettings struct {
|
||||
}
|
||||
|
||||
func (s *DefaultSettings) GetLicense() string {
|
||||
return "selfhosted"
|
||||
}
|
||||
|
||||
func (s *DefaultSettings) GetPeerLoginExpiration() time.Duration {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (s *DefaultSettings) SetPeerLoginExpiration(duration time.Duration) {
|
||||
|
||||
}
|
||||
|
||||
func (s *DefaultSettings) GetPeerLoginExpirationEnabled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *DefaultSettings) SetPeerLoginExpirationEnabled(bool) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user