mirror of
https://github.com/netbirdio/netbird.git
synced 2025-02-09 14:59:21 +01:00
27 lines
546 B
Go
27 lines
546 B
Go
package users
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/netbirdio/netbird/management/server/store"
|
|
"github.com/netbirdio/netbird/management/server/types"
|
|
)
|
|
|
|
type Manager interface {
|
|
GetUser(ctx context.Context, userID string) (*types.User, error)
|
|
}
|
|
|
|
type managerImpl struct {
|
|
store store.Store
|
|
}
|
|
|
|
func NewManager(store store.Store) Manager {
|
|
return &managerImpl{
|
|
store: store,
|
|
}
|
|
}
|
|
|
|
func (m *managerImpl) GetUser(ctx context.Context, userID string) (*types.User, error) {
|
|
return m.store.GetUserByUserID(ctx, store.LockingStrengthShare, userID)
|
|
}
|