Documentation
¶
Index ¶
- type ManagementServiceServerMock
- func (m ManagementServiceServerMock) GetDeviceAuthorizationFlow(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
- func (m ManagementServiceServerMock) GetPKCEAuthorizationFlow(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
- func (m ManagementServiceServerMock) GetServerKey(ctx context.Context, empty *proto.Empty) (*proto.ServerKeyResponse, error)
- func (m ManagementServiceServerMock) IsHealthy(ctx context.Context, empty *proto.Empty) (*proto.Empty, error)
- func (m ManagementServiceServerMock) Login(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
- func (m ManagementServiceServerMock) Sync(msg *proto.EncryptedMessage, sync proto.ManagementService_SyncServer) error
- func (m ManagementServiceServerMock) SyncMeta(ctx context.Context, req *proto.EncryptedMessage) (*proto.Empty, error)
- type MockAccountManager
- func (am *MockAccountManager) AcceptUserInvite(ctx context.Context, token, password string) error
- func (am *MockAccountManager) AccountExists(ctx context.Context, accountID string) (bool, error)
- func (am *MockAccountManager) AddPeer(ctx context.Context, accountID string, setupKey string, userId string, ...) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, error)
- func (am *MockAccountManager) AllowSync(key string, hash uint64) bool
- func (am *MockAccountManager) ApproveUser(ctx context.Context, accountID, initiatorUserID, targetUserID string) (*types.UserInfo, error)
- func (am *MockAccountManager) BufferUpdateAccountPeers(ctx context.Context, accountID string, reason types.UpdateReason)
- func (am *MockAccountManager) BuildUserInfosForAccount(ctx context.Context, accountID, initiatorUserID string, ...) (map[string]*types.UserInfo, error)
- func (am *MockAccountManager) CreateGroup(ctx context.Context, accountID, userID string, group *types.Group) error
- func (am *MockAccountManager) CreateGroups(ctx context.Context, accountID, userID string, newGroups []*types.Group) error
- func (am *MockAccountManager) CreateIdentityProvider(ctx context.Context, accountID, userID string, idp *types.IdentityProvider) (*types.IdentityProvider, error)
- func (am *MockAccountManager) CreateNameServerGroup(ctx context.Context, accountID string, name, description string, ...) (*nbdns.NameServerGroup, error)
- func (am *MockAccountManager) CreatePAT(ctx context.Context, accountID string, initiatorUserID string, ...) (*types.PersonalAccessTokenGenerated, error)
- func (am *MockAccountManager) CreatePeerJob(ctx context.Context, accountID, peerID, userID string, job *types.Job) error
- func (am *MockAccountManager) CreateRoute(ctx context.Context, accountID string, prefix netip.Prefix, ...) (*route.Route, error)
- func (am *MockAccountManager) CreateSetupKey(ctx context.Context, accountID string, keyName string, ...) (*types.SetupKey, error)
- func (am *MockAccountManager) CreateUser(ctx context.Context, accountID, userID string, invite *types.UserInfo) (*types.UserInfo, error)
- func (am *MockAccountManager) CreateUserInvite(ctx context.Context, accountID, initiatorUserID string, invite *types.UserInfo, ...) (*types.UserInvite, error)
- func (am *MockAccountManager) DeleteAccount(ctx context.Context, accountID, userID string) error
- func (am *MockAccountManager) DeleteGroup(ctx context.Context, accountId, userId, groupID string) error
- func (am *MockAccountManager) DeleteGroups(ctx context.Context, accountId, userId string, groupIDs []string) error
- func (am *MockAccountManager) DeleteIdentityProvider(ctx context.Context, accountID, idpID, userID string) error
- func (am *MockAccountManager) DeleteNameServerGroup(ctx context.Context, accountID, nsGroupID, userID string) error
- func (am *MockAccountManager) DeletePAT(ctx context.Context, accountID string, initiatorUserID string, ...) error
- func (am *MockAccountManager) DeletePeer(ctx context.Context, accountID, peerID, userID string) error
- func (am *MockAccountManager) DeletePolicy(ctx context.Context, accountID, policyID, userID string) error
- func (am *MockAccountManager) DeletePostureChecks(ctx context.Context, accountID, postureChecksID, userID string) error
- func (am *MockAccountManager) DeleteRegularUsers(ctx context.Context, accountID, initiatorUserID string, targetUserIDs []string, ...) error
- func (am *MockAccountManager) DeleteRoute(ctx context.Context, accountID string, routeID route.ID, userID string) error
- func (am *MockAccountManager) DeleteRule(ctx context.Context, accountID, ruleID, userID string) error
- func (am *MockAccountManager) DeleteSetupKey(ctx context.Context, accountID, userID, keyID string) error
- func (am *MockAccountManager) DeleteUser(ctx context.Context, accountID string, initiatorUserID string, ...) error
- func (am *MockAccountManager) DeleteUserInvite(ctx context.Context, accountID, initiatorUserID, inviteID string) error
- func (am *MockAccountManager) FindExistingPostureCheck(accountID string, checks *posture.ChecksDefinition) (*posture.Checks, error)
- func (am *MockAccountManager) GetAccount(ctx context.Context, accountID string) (*types.Account, error)
- func (am *MockAccountManager) GetAccountByID(ctx context.Context, accountID string, userID string) (*types.Account, error)
- func (am *MockAccountManager) GetAccountIDByUserID(ctx context.Context, userAuth auth.UserAuth) (string, error)
- func (am *MockAccountManager) GetAccountIDForPeerKey(ctx context.Context, peerKey string) (string, error)
- func (am *MockAccountManager) GetAccountIDFromUserAuth(ctx context.Context, userAuth auth.UserAuth) (string, string, error)
- func (am *MockAccountManager) GetAccountMeta(ctx context.Context, accountID string, userID string) (*types.AccountMeta, error)
- func (am *MockAccountManager) GetAccountOnboarding(ctx context.Context, accountID string, userID string) (*types.AccountOnboarding, error)
- func (am *MockAccountManager) GetAccountSettings(ctx context.Context, accountID string, userID string) (*types.Settings, error)
- func (am *MockAccountManager) GetAllConnectedPeers() (map[string]struct{}, error)
- func (am *MockAccountManager) GetAllGroups(ctx context.Context, accountID, userID string) ([]*types.Group, error)
- func (am *MockAccountManager) GetAllPATs(ctx context.Context, accountID string, initiatorUserID string, ...) ([]*types.PersonalAccessToken, error)
- func (am *MockAccountManager) GetAllPeerJobs(ctx context.Context, accountID, userID, peerID string) ([]*types.Job, error)
- func (am *MockAccountManager) GetCurrentUserInfo(ctx context.Context, userAuth auth.UserAuth) (*users.UserInfoWithPermissions, error)
- func (am *MockAccountManager) GetDNSDomain(settings *types.Settings) string
- func (am *MockAccountManager) GetDNSSettings(ctx context.Context, accountID string, userID string) (*types.DNSSettings, error)
- func (am *MockAccountManager) GetEvents(ctx context.Context, accountID, userID string) ([]*activity.Event, error)
- func (am *MockAccountManager) GetExternalCacheManager() account.ExternalCacheManager
- func (am *MockAccountManager) GetGroup(ctx context.Context, accountId, groupID, userID string) (*types.Group, error)
- func (am *MockAccountManager) GetGroupByName(ctx context.Context, groupName, accountID, userID string) (*types.Group, error)
- func (am *MockAccountManager) GetIdentityProvider(ctx context.Context, accountID, idpID, userID string) (*types.IdentityProvider, error)
- func (am *MockAccountManager) GetIdentityProviders(ctx context.Context, accountID, userID string) ([]*types.IdentityProvider, error)
- func (am *MockAccountManager) GetIdpManager() idp.Manager
- func (am *MockAccountManager) GetNameServerGroup(ctx context.Context, accountID, userID, nsGroupID string) (*nbdns.NameServerGroup, error)
- func (am *MockAccountManager) GetNetworkMap(ctx context.Context, peerKey string) (*types.NetworkMap, error)
- func (am *MockAccountManager) GetOrCreateAccountByPrivateDomain(ctx context.Context, initiatorId, domain string) (*types.Account, bool, error)
- func (am *MockAccountManager) GetOrCreateAccountByUser(ctx context.Context, userAuth auth.UserAuth) (*types.Account, error)
- func (am *MockAccountManager) GetOwnerInfo(ctx context.Context, accountId string) (*types.UserInfo, error)
- func (am *MockAccountManager) GetPAT(ctx context.Context, accountID string, initiatorUserID string, ...) (*types.PersonalAccessToken, error)
- func (am *MockAccountManager) GetPeer(ctx context.Context, accountID, peerID, userID string) (*nbpeer.Peer, error)
- func (am *MockAccountManager) GetPeerGroups(ctx context.Context, accountID, peerID string) ([]*types.Group, error)
- func (am *MockAccountManager) GetPeerJobByID(ctx context.Context, accountID, userID, peerID, jobID string) (*types.Job, error)
- func (am *MockAccountManager) GetPeerNetwork(ctx context.Context, peerKey string) (*types.Network, error)
- func (am *MockAccountManager) GetPeers(ctx context.Context, accountID, userID, nameFilter, ipFilter string) ([]*nbpeer.Peer, error)
- func (am *MockAccountManager) GetPolicy(ctx context.Context, accountID, policyID, userID string) (*types.Policy, error)
- func (am *MockAccountManager) GetPostureChecks(ctx context.Context, accountID, postureChecksID, userID string) (*posture.Checks, error)
- func (am *MockAccountManager) GetRoute(ctx context.Context, accountID string, routeID route.ID, userID string) (*route.Route, error)
- func (am *MockAccountManager) GetSetupKey(ctx context.Context, accountID, userID, keyID string) (*types.SetupKey, error)
- func (am *MockAccountManager) GetStore() store.Store
- func (am *MockAccountManager) GetUserByID(ctx context.Context, id string) (*types.User, error)
- func (am *MockAccountManager) GetUserFromUserAuth(ctx context.Context, userAuth auth.UserAuth) (*types.User, error)
- func (am *MockAccountManager) GetUserIDByPeerKey(ctx context.Context, peerKey string) (string, error)
- func (am *MockAccountManager) GetUserInviteInfo(ctx context.Context, token string) (*types.UserInviteInfo, error)
- func (am *MockAccountManager) GetUsersFromAccount(ctx context.Context, accountID string, userID string) (map[string]*types.UserInfo, error)
- func (am *MockAccountManager) GetValidatedPeers(ctx context.Context, accountID string) (map[string]struct{}, map[string]string, error)
- func (am *MockAccountManager) GroupAddPeer(ctx context.Context, accountID, groupID, peerID string) error
- func (am *MockAccountManager) GroupDeletePeer(ctx context.Context, accountID, groupID, peerID string) error
- func (am *MockAccountManager) GroupValidation(ctx context.Context, accountId string, groups []string) (bool, error)
- func (am *MockAccountManager) HasConnectedChannel(peerID string) bool
- func (am *MockAccountManager) InviteUser(ctx context.Context, accountID string, initiatorUserID string, ...) error
- func (am *MockAccountManager) ListNameServerGroups(ctx context.Context, accountID string, userID string) ([]*nbdns.NameServerGroup, error)
- func (am *MockAccountManager) ListPolicies(ctx context.Context, accountID, userID string) ([]*types.Policy, error)
- func (am *MockAccountManager) ListPostureChecks(ctx context.Context, accountID, userID string) ([]*posture.Checks, error)
- func (am *MockAccountManager) ListRoutes(ctx context.Context, accountID, userID string) ([]*route.Route, error)
- func (am *MockAccountManager) ListSetupKeys(ctx context.Context, accountID, userID string) ([]*types.SetupKey, error)
- func (am *MockAccountManager) ListUserInvites(ctx context.Context, accountID, initiatorUserID string) ([]*types.UserInvite, error)
- func (am *MockAccountManager) ListUsers(ctx context.Context, accountID string) ([]*types.User, error)
- func (am *MockAccountManager) LoginPeer(ctx context.Context, login types.PeerLogin) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, error)
- func (am *MockAccountManager) MarkPeerConnected(ctx context.Context, peerKey string, connected bool, realIP net.IP, ...) error
- func (am *MockAccountManager) OnPeerDisconnected(_ context.Context, accountID string, peerPubKey string, ...) error
- func (am *MockAccountManager) RecalculateNetworkMapCache(ctx context.Context, accountID string) error
- func (am *MockAccountManager) RegenerateUserInvite(ctx context.Context, accountID, initiatorUserID, inviteID string, ...) (*types.UserInvite, error)
- func (am *MockAccountManager) RejectUser(ctx context.Context, accountID, initiatorUserID, targetUserID string) error
- func (am *MockAccountManager) SaveDNSSettings(ctx context.Context, accountID string, userID string, ...) error
- func (am *MockAccountManager) SaveGroup(ctx context.Context, accountID, userID string, group *types.Group, create bool) error
- func (am *MockAccountManager) SaveGroups(ctx context.Context, accountID, userID string, groups []*types.Group, ...) error
- func (am *MockAccountManager) SaveNameServerGroup(ctx context.Context, accountID, userID string, ...) error
- func (am *MockAccountManager) SaveOrAddUser(ctx context.Context, accountID, userID string, user *types.User, ...) (*types.UserInfo, error)
- func (am *MockAccountManager) SaveOrAddUsers(ctx context.Context, accountID, userID string, users []*types.User, ...) ([]*types.UserInfo, error)
- func (am *MockAccountManager) SavePolicy(ctx context.Context, accountID, userID string, policy *types.Policy, ...) (*types.Policy, error)
- func (am *MockAccountManager) SavePostureChecks(ctx context.Context, accountID, userID string, postureChecks *posture.Checks, ...) (*posture.Checks, error)
- func (am *MockAccountManager) SaveRoute(ctx context.Context, accountID string, userID string, route *route.Route) error
- func (am *MockAccountManager) SaveSetupKey(ctx context.Context, accountID string, key *types.SetupKey, userID string) (*types.SetupKey, error)
- func (am *MockAccountManager) SaveUser(ctx context.Context, accountID, userID string, user *types.User) (*types.UserInfo, error)
- func (am *MockAccountManager) SetServiceManager(serviceManager service.Manager)
- func (am *MockAccountManager) StoreEvent(ctx context.Context, initiatorID, targetID, accountID string, ...)
- func (am *MockAccountManager) SyncAndMarkPeer(ctx context.Context, accountID string, peerPubKey string, ...) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error)
- func (am *MockAccountManager) SyncPeer(ctx context.Context, sync types.PeerSync, accountID string) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error)
- func (am *MockAccountManager) SyncPeerMeta(ctx context.Context, peerPubKey string, meta nbpeer.PeerSystemMeta) error
- func (am *MockAccountManager) SyncUserJWTGroups(ctx context.Context, userAuth auth.UserAuth) error
- func (am *MockAccountManager) UpdateAccountOnboarding(ctx context.Context, accountID string, userID string, ...) (*types.AccountOnboarding, error)
- func (am *MockAccountManager) UpdateAccountPeers(ctx context.Context, accountID string, reason types.UpdateReason)
- func (am *MockAccountManager) UpdateAccountSettings(ctx context.Context, accountID, userID string, newSettings *types.Settings) (*types.Settings, error)
- func (am *MockAccountManager) UpdateGroup(ctx context.Context, accountID, userID string, group *types.Group) error
- func (am *MockAccountManager) UpdateGroups(ctx context.Context, accountID, userID string, newGroups []*types.Group) error
- func (am *MockAccountManager) UpdateIdentityProvider(ctx context.Context, accountID, idpID, userID string, ...) (*types.IdentityProvider, error)
- func (am *MockAccountManager) UpdateIntegratedValidator(ctx context.Context, accountID, userID, validator string, groups []string) error
- func (am *MockAccountManager) UpdatePeer(ctx context.Context, accountID, userID string, peer *nbpeer.Peer) (*nbpeer.Peer, error)
- func (am *MockAccountManager) UpdatePeerIP(ctx context.Context, accountID, userID, peerID string, newIP netip.Addr) error
- func (am *MockAccountManager) UpdatePeerIPv6(ctx context.Context, accountID, userID, peerID string, newIPv6 netip.Addr) error
- func (am *MockAccountManager) UpdatePeerMeta(ctx context.Context, peerID string, meta nbpeer.PeerSystemMeta) error
- func (am *MockAccountManager) UpdateToPrimaryAccount(ctx context.Context, accountId string) error
- func (am *MockAccountManager) UpdateUserPassword(ctx context.Context, accountID, currentUserID, targetUserID string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManagementServiceServerMock ¶
type ManagementServiceServerMock struct {
proto.UnimplementedManagementServiceServer
LoginFunc func(context.Context, *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
SyncFunc func(*proto.EncryptedMessage, proto.ManagementService_SyncServer)
GetServerKeyFunc func(context.Context, *proto.Empty) (*proto.ServerKeyResponse, error)
IsHealthyFunc func(context.Context, *proto.Empty) (*proto.Empty, error)
GetDeviceAuthorizationFlowFunc func(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
GetPKCEAuthorizationFlowFunc func(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
SyncMetaFunc func(ctx context.Context, req *proto.EncryptedMessage) (*proto.Empty, error)
}
func (ManagementServiceServerMock) GetDeviceAuthorizationFlow ¶
func (m ManagementServiceServerMock) GetDeviceAuthorizationFlow(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
func (ManagementServiceServerMock) GetPKCEAuthorizationFlow ¶ added in v0.22.0
func (m ManagementServiceServerMock) GetPKCEAuthorizationFlow(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
func (ManagementServiceServerMock) GetServerKey ¶
func (m ManagementServiceServerMock) GetServerKey(ctx context.Context, empty *proto.Empty) (*proto.ServerKeyResponse, error)
func (ManagementServiceServerMock) Login ¶
func (m ManagementServiceServerMock) Login(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
func (ManagementServiceServerMock) Sync ¶
func (m ManagementServiceServerMock) Sync(msg *proto.EncryptedMessage, sync proto.ManagementService_SyncServer) error
func (ManagementServiceServerMock) SyncMeta ¶ added in v0.28.0
func (m ManagementServiceServerMock) SyncMeta(ctx context.Context, req *proto.EncryptedMessage) (*proto.Empty, error)
type MockAccountManager ¶
type MockAccountManager struct {
GetOrCreateAccountByUserFunc func(ctx context.Context, userAuth auth.UserAuth) (*types.Account, error)
GetAccountFunc func(ctx context.Context, accountID string) (*types.Account, error)
CreateSetupKeyFunc func(ctx context.Context, accountId string, keyName string, keyType types.SetupKeyType,
expiresIn time.Duration, autoGroups []string, usageLimit int, userID string, ephemeral bool, allowExtraDNSLabels bool) (*types.SetupKey, error)
GetSetupKeyFunc func(ctx context.Context, accountID, userID, keyID string) (*types.SetupKey, error)
AccountExistsFunc func(ctx context.Context, accountID string) (bool, error)
GetAccountIDByUserIdFunc func(ctx context.Context, userAuth auth.UserAuth) (string, error)
GetUserFromUserAuthFunc func(ctx context.Context, userAuth auth.UserAuth) (*types.User, error)
ListUsersFunc func(ctx context.Context, accountID string) ([]*types.User, error)
GetPeersFunc func(ctx context.Context, accountID, userID, nameFilter, ipFilter string) ([]*nbpeer.Peer, error)
MarkPeerConnectedFunc func(ctx context.Context, peerKey string, connected bool, realIP net.IP, syncTime time.Time) error
SyncAndMarkPeerFunc func(ctx context.Context, accountID string, peerPubKey string, meta nbpeer.PeerSystemMeta, realIP net.IP, syncTime time.Time) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error)
DeletePeerFunc func(ctx context.Context, accountID, peerKey, userID string) error
GetNetworkMapFunc func(ctx context.Context, peerKey string) (*types.NetworkMap, error)
GetPeerNetworkFunc func(ctx context.Context, peerKey string) (*types.Network, error)
AddPeerFunc func(ctx context.Context, accountID string, setupKey string, userId string, peer *nbpeer.Peer, temporary bool) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, error)
GetGroupFunc func(ctx context.Context, accountID, groupID, userID string) (*types.Group, error)
GetAllGroupsFunc func(ctx context.Context, accountID, userID string) ([]*types.Group, error)
GetGroupByNameFunc func(ctx context.Context, groupName, accountID, userID string) (*types.Group, error)
SaveGroupFunc func(ctx context.Context, accountID, userID string, group *types.Group, create bool) error
SaveGroupsFunc func(ctx context.Context, accountID, userID string, groups []*types.Group, create bool) error
DeleteGroupFunc func(ctx context.Context, accountID, userId, groupID string) error
DeleteGroupsFunc func(ctx context.Context, accountId, userId string, groupIDs []string) error
GroupAddPeerFunc func(ctx context.Context, accountID, groupID, peerID string) error
GroupDeletePeerFunc func(ctx context.Context, accountID, groupID, peerID string) error
GetPeerGroupsFunc func(ctx context.Context, accountID, peerID string) ([]*types.Group, error)
DeleteRuleFunc func(ctx context.Context, accountID, ruleID, userID string) error
GetPolicyFunc func(ctx context.Context, accountID, policyID, userID string) (*types.Policy, error)
SavePolicyFunc func(ctx context.Context, accountID, userID string, policy *types.Policy, create bool) (*types.Policy, error)
DeletePolicyFunc func(ctx context.Context, accountID, policyID, userID string) error
ListPoliciesFunc func(ctx context.Context, accountID, userID string) ([]*types.Policy, error)
GetUsersFromAccountFunc func(ctx context.Context, accountID, userID string) (map[string]*types.UserInfo, error)
UpdatePeerMetaFunc func(ctx context.Context, peerID string, meta nbpeer.PeerSystemMeta) error
UpdatePeerFunc func(ctx context.Context, accountID, userID string, peer *nbpeer.Peer) (*nbpeer.Peer, error)
UpdatePeerIPFunc func(ctx context.Context, accountID, userID, peerID string, newIP netip.Addr) error
UpdatePeerIPv6Func func(ctx context.Context, accountID, userID, peerID string, newIPv6 netip.Addr) error
CreateRouteFunc func(ctx context.Context, accountID string, prefix netip.Prefix, networkType route.NetworkType, domains domain.List, peer string, peerGroups []string, description string, netID route.NetID, masquerade bool, metric int, groups, accessControlGroupIDs []string, enabled bool, userID string, keepRoute bool, isSelected bool) (*route.Route, error)
GetRouteFunc func(ctx context.Context, accountID string, routeID route.ID, userID string) (*route.Route, error)
SaveRouteFunc func(ctx context.Context, accountID string, userID string, route *route.Route) error
DeleteRouteFunc func(ctx context.Context, accountID string, routeID route.ID, userID string) error
ListRoutesFunc func(ctx context.Context, accountID, userID string) ([]*route.Route, error)
SaveSetupKeyFunc func(ctx context.Context, accountID string, key *types.SetupKey, userID string) (*types.SetupKey, error)
ListSetupKeysFunc func(ctx context.Context, accountID, userID string) ([]*types.SetupKey, error)
SaveUserFunc func(ctx context.Context, accountID, userID string, user *types.User) (*types.UserInfo, error)
SaveOrAddUserFunc func(ctx context.Context, accountID, userID string, user *types.User, addIfNotExists bool) (*types.UserInfo, error)
SaveOrAddUsersFunc func(ctx context.Context, accountID, initiatorUserID string, update []*types.User, addIfNotExists bool) ([]*types.UserInfo, error)
DeleteUserFunc func(ctx context.Context, accountID string, initiatorUserID string, targetUserID string) error
DeleteRegularUsersFunc func(ctx context.Context, accountID, initiatorUserID string, targetUserIDs []string, userInfos map[string]*types.UserInfo) error
UpdateUserPasswordFunc func(ctx context.Context, accountID, currentUserID, targetUserID string, oldPassword, newPassword string) error
CreatePATFunc func(ctx context.Context, accountID string, initiatorUserID string, targetUserId string, tokenName string, expiresIn int) (*types.PersonalAccessTokenGenerated, error)
DeletePATFunc func(ctx context.Context, accountID string, initiatorUserID string, targetUserId string, tokenID string) error
GetPATFunc func(ctx context.Context, accountID string, initiatorUserID string, targetUserId string, tokenID string) (*types.PersonalAccessToken, error)
GetAllPATsFunc func(ctx context.Context, accountID string, initiatorUserID string, targetUserId string) ([]*types.PersonalAccessToken, error)
GetNameServerGroupFunc func(ctx context.Context, accountID, userID, nsGroupID string) (*nbdns.NameServerGroup, error)
CreateNameServerGroupFunc func(ctx context.Context, accountID string, name, description string, nameServerList []nbdns.NameServer, groups []string, primary bool, domains []string, enabled bool, userID string, searchDomainsEnabled bool) (*nbdns.NameServerGroup, error)
SaveNameServerGroupFunc func(ctx context.Context, accountID, userID string, nsGroupToSave *nbdns.NameServerGroup) error
DeleteNameServerGroupFunc func(ctx context.Context, accountID, nsGroupID, userID string) error
ListNameServerGroupsFunc func(ctx context.Context, accountID string, userID string) ([]*nbdns.NameServerGroup, error)
CreateUserFunc func(ctx context.Context, accountID, userID string, key *types.UserInfo) (*types.UserInfo, error)
GetAccountIDFromUserAuthFunc func(ctx context.Context, userAuth auth.UserAuth) (string, string, error)
DeleteAccountFunc func(ctx context.Context, accountID, userID string) error
GetDNSDomainFunc func(settings *types.Settings) string
StoreEventFunc func(ctx context.Context, initiatorID, targetID, accountID string, activityID activity.ActivityDescriber, meta map[string]any)
GetEventsFunc func(ctx context.Context, accountID, userID string) ([]*activity.Event, error)
GetDNSSettingsFunc func(ctx context.Context, accountID, userID string) (*types.DNSSettings, error)
SaveDNSSettingsFunc func(ctx context.Context, accountID, userID string, dnsSettingsToSave *types.DNSSettings) error
GetPeerFunc func(ctx context.Context, accountID, peerID, userID string) (*nbpeer.Peer, error)
UpdateAccountSettingsFunc func(ctx context.Context, accountID, userID string, newSettings *types.Settings) (*types.Settings, error)
LoginPeerFunc func(ctx context.Context, login types.PeerLogin) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, error)
SyncPeerFunc func(ctx context.Context, sync types.PeerSync, accountID string) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error)
InviteUserFunc func(ctx context.Context, accountID string, initiatorUserID string, targetUserEmail string) error
ApproveUserFunc func(ctx context.Context, accountID, initiatorUserID, targetUserID string) (*types.UserInfo, error)
RejectUserFunc func(ctx context.Context, accountID, initiatorUserID, targetUserID string) error
GetAllConnectedPeersFunc func() (map[string]struct{}, error)
HasConnectedChannelFunc func(peerID string) bool
GetExternalCacheManagerFunc func() account.ExternalCacheManager
GetPostureChecksFunc func(ctx context.Context, accountID, postureChecksID, userID string) (*posture.Checks, error)
SavePostureChecksFunc func(ctx context.Context, accountID, userID string, postureChecks *posture.Checks, create bool) (*posture.Checks, error)
DeletePostureChecksFunc func(ctx context.Context, accountID, postureChecksID, userID string) error
ListPostureChecksFunc func(ctx context.Context, accountID, userID string) ([]*posture.Checks, error)
GetIdpManagerFunc func() idp.Manager
UpdateIntegratedValidatorFunc func(ctx context.Context, accountID, userID, validator string, groups []string) error
GroupValidationFunc func(ctx context.Context, accountId string, groups []string) (bool, error)
SyncPeerMetaFunc func(ctx context.Context, peerPubKey string, meta nbpeer.PeerSystemMeta) error
FindExistingPostureCheckFunc func(accountID string, checks *posture.ChecksDefinition) (*posture.Checks, error)
GetAccountIDForPeerKeyFunc func(ctx context.Context, peerKey string) (string, error)
GetAccountByIDFunc func(ctx context.Context, accountID string, userID string) (*types.Account, error)
GetUserByIDFunc func(ctx context.Context, id string) (*types.User, error)
GetAccountSettingsFunc func(ctx context.Context, accountID string, userID string) (*types.Settings, error)
DeleteSetupKeyFunc func(ctx context.Context, accountID, userID, keyID string) error
BuildUserInfosForAccountFunc func(ctx context.Context, accountID, initiatorUserID string, accountUsers []*types.User) (map[string]*types.UserInfo, error)
GetStoreFunc func() store.Store
UpdateToPrimaryAccountFunc func(ctx context.Context, accountId string) error
GetOwnerInfoFunc func(ctx context.Context, accountID string) (*types.UserInfo, error)
GetCurrentUserInfoFunc func(ctx context.Context, userAuth auth.UserAuth) (*users.UserInfoWithPermissions, error)
GetAccountMetaFunc func(ctx context.Context, accountID, userID string) (*types.AccountMeta, error)
GetAccountOnboardingFunc func(ctx context.Context, accountID, userID string) (*types.AccountOnboarding, error)
UpdateAccountOnboardingFunc func(ctx context.Context, accountID, userID string, onboarding *types.AccountOnboarding) (*types.AccountOnboarding, error)
GetOrCreateAccountByPrivateDomainFunc func(ctx context.Context, initiatorId, domain string) (*types.Account, bool, error)
AllowSyncFunc func(string, uint64) bool
UpdateAccountPeersFunc func(ctx context.Context, accountID string, reason types.UpdateReason)
BufferUpdateAccountPeersFunc func(ctx context.Context, accountID string, reason types.UpdateReason)
RecalculateNetworkMapCacheFunc func(ctx context.Context, accountId string) error
GetIdentityProviderFunc func(ctx context.Context, accountID, idpID, userID string) (*types.IdentityProvider, error)
GetIdentityProvidersFunc func(ctx context.Context, accountID, userID string) ([]*types.IdentityProvider, error)
CreateIdentityProviderFunc func(ctx context.Context, accountID, userID string, idp *types.IdentityProvider) (*types.IdentityProvider, error)
UpdateIdentityProviderFunc func(ctx context.Context, accountID, idpID, userID string, idp *types.IdentityProvider) (*types.IdentityProvider, error)
DeleteIdentityProviderFunc func(ctx context.Context, accountID, idpID, userID string) error
CreatePeerJobFunc func(ctx context.Context, accountID, peerID, userID string, job *types.Job) error
GetAllPeerJobsFunc func(ctx context.Context, accountID, userID, peerID string) ([]*types.Job, error)
GetPeerJobByIDFunc func(ctx context.Context, accountID, userID, peerID, jobID string) (*types.Job, error)
CreateUserInviteFunc func(ctx context.Context, accountID, initiatorUserID string, invite *types.UserInfo, expiresIn int) (*types.UserInvite, error)
AcceptUserInviteFunc func(ctx context.Context, token, password string) error
RegenerateUserInviteFunc func(ctx context.Context, accountID, initiatorUserID, inviteID string, expiresIn int) (*types.UserInvite, error)
GetUserInviteInfoFunc func(ctx context.Context, token string) (*types.UserInviteInfo, error)
ListUserInvitesFunc func(ctx context.Context, accountID, initiatorUserID string) ([]*types.UserInvite, error)
DeleteUserInviteFunc func(ctx context.Context, accountID, initiatorUserID, inviteID string) error
}
func (*MockAccountManager) AcceptUserInvite ¶ added in v0.64.2
func (am *MockAccountManager) AcceptUserInvite(ctx context.Context, token, password string) error
func (*MockAccountManager) AccountExists ¶
AccountExists mock implementation of AccountExists from server.AccountManager interface
func (*MockAccountManager) AddPeer ¶
func (am *MockAccountManager) AddPeer( ctx context.Context, accountID string, setupKey string, userId string, peer *nbpeer.Peer, temporary bool, ) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, error)
AddPeer mock implementation of AddPeer from server.AccountManager interface
func (*MockAccountManager) AllowSync ¶ added in v0.56.0
func (am *MockAccountManager) AllowSync(key string, hash uint64) bool
func (*MockAccountManager) ApproveUser ¶ added in v0.56.0
func (*MockAccountManager) BufferUpdateAccountPeers ¶ added in v0.50.2
func (am *MockAccountManager) BufferUpdateAccountPeers(ctx context.Context, accountID string, reason types.UpdateReason)
func (*MockAccountManager) BuildUserInfosForAccount ¶ added in v0.37.0
func (am *MockAccountManager) BuildUserInfosForAccount(ctx context.Context, accountID, initiatorUserID string, accountUsers []*types.User) (map[string]*types.UserInfo, error)
BuildUserInfosForAccount mocks BuildUserInfosForAccount of the AccountManager interface
func (*MockAccountManager) CreateGroup ¶ added in v0.53.0
func (*MockAccountManager) CreateGroups ¶ added in v0.53.0
func (*MockAccountManager) CreateIdentityProvider ¶ added in v0.62.0
func (am *MockAccountManager) CreateIdentityProvider(ctx context.Context, accountID, userID string, idp *types.IdentityProvider) (*types.IdentityProvider, error)
CreateIdentityProvider mocks CreateIdentityProvider of the AccountManager interface
func (*MockAccountManager) CreateNameServerGroup ¶ added in v0.9.8
func (am *MockAccountManager) CreateNameServerGroup(ctx context.Context, accountID string, name, description string, nameServerList []nbdns.NameServer, groups []string, primary bool, domains []string, enabled bool, userID string, searchDomainsEnabled bool) (*nbdns.NameServerGroup, error)
CreateNameServerGroup mocks CreateNameServerGroup of the AccountManager interface
func (*MockAccountManager) CreatePAT ¶ added in v0.14.6
func (am *MockAccountManager) CreatePAT(ctx context.Context, accountID string, initiatorUserID string, targetUserID string, name string, expiresIn int) (*types.PersonalAccessTokenGenerated, error)
CreatePAT mock implementation of GetPAT from server.AccountManager interface
func (*MockAccountManager) CreatePeerJob ¶ added in v0.64.0
func (*MockAccountManager) CreateRoute ¶ added in v0.8.9
func (am *MockAccountManager) CreateRoute(ctx context.Context, accountID string, prefix netip.Prefix, networkType route.NetworkType, domains domain.List, peerID string, peerGroupIDs []string, description string, netID route.NetID, masquerade bool, metric int, groups, accessControlGroupID []string, enabled bool, userID string, keepRoute bool, isSelected bool) (*route.Route, error)
CreateRoute mock implementation of CreateRoute from server.AccountManager interface
func (*MockAccountManager) CreateSetupKey ¶ added in v0.9.2
func (am *MockAccountManager) CreateSetupKey( ctx context.Context, accountID string, keyName string, keyType types.SetupKeyType, expiresIn time.Duration, autoGroups []string, usageLimit int, userID string, ephemeral bool, allowExtraDNSLabels bool, ) (*types.SetupKey, error)
CreateSetupKey mock implementation of CreateSetupKey from server.AccountManager interface
func (*MockAccountManager) CreateUser ¶ added in v0.9.8
func (am *MockAccountManager) CreateUser(ctx context.Context, accountID, userID string, invite *types.UserInfo) (*types.UserInfo, error)
CreateUser mocks CreateUser of the AccountManager interface
func (*MockAccountManager) CreateUserInvite ¶ added in v0.64.2
func (am *MockAccountManager) CreateUserInvite(ctx context.Context, accountID, initiatorUserID string, invite *types.UserInfo, expiresIn int) (*types.UserInvite, error)
func (*MockAccountManager) DeleteAccount ¶ added in v0.24.4
func (am *MockAccountManager) DeleteAccount(ctx context.Context, accountID, userID string) error
DeleteAccount mock implementation of DeleteAccount from server.AccountManager interface
func (*MockAccountManager) DeleteGroup ¶
func (am *MockAccountManager) DeleteGroup(ctx context.Context, accountId, userId, groupID string) error
DeleteGroup mock implementation of DeleteGroup from server.AccountManager interface
func (*MockAccountManager) DeleteGroups ¶ added in v0.28.8
func (am *MockAccountManager) DeleteGroups(ctx context.Context, accountId, userId string, groupIDs []string) error
DeleteGroups mock implementation of DeleteGroups from server.AccountManager interface
func (*MockAccountManager) DeleteIdentityProvider ¶ added in v0.62.0
func (am *MockAccountManager) DeleteIdentityProvider(ctx context.Context, accountID, idpID, userID string) error
DeleteIdentityProvider mocks DeleteIdentityProvider of the AccountManager interface
func (*MockAccountManager) DeleteNameServerGroup ¶ added in v0.9.8
func (am *MockAccountManager) DeleteNameServerGroup(ctx context.Context, accountID, nsGroupID, userID string) error
DeleteNameServerGroup mocks DeleteNameServerGroup of the AccountManager interface
func (*MockAccountManager) DeletePAT ¶ added in v0.14.5
func (am *MockAccountManager) DeletePAT(ctx context.Context, accountID string, initiatorUserID string, targetUserID string, tokenID string) error
DeletePAT mock implementation of DeletePAT from server.AccountManager interface
func (*MockAccountManager) DeletePeer ¶
func (am *MockAccountManager) DeletePeer(ctx context.Context, accountID, peerID, userID string) error
DeletePeer mock implementation of DeletePeer from server.AccountManager interface
func (*MockAccountManager) DeletePolicy ¶ added in v0.14.5
func (am *MockAccountManager) DeletePolicy(ctx context.Context, accountID, policyID, userID string) error
DeletePolicy mock implementation of DeletePolicy from server.AccountManager interface
func (*MockAccountManager) DeletePostureChecks ¶ added in v0.26.0
func (am *MockAccountManager) DeletePostureChecks(ctx context.Context, accountID, postureChecksID, userID string) error
DeletePostureChecks mocks DeletePostureChecks of the AccountManager interface
func (*MockAccountManager) DeleteRegularUsers ¶ added in v0.28.8
func (am *MockAccountManager) DeleteRegularUsers(ctx context.Context, accountID, initiatorUserID string, targetUserIDs []string, userInfos map[string]*types.UserInfo) error
DeleteRegularUsers mocks DeleteRegularUsers of the AccountManager interface
func (*MockAccountManager) DeleteRoute ¶ added in v0.8.9
func (am *MockAccountManager) DeleteRoute(ctx context.Context, accountID string, routeID route.ID, userID string) error
DeleteRoute mock implementation of DeleteRoute from server.AccountManager interface
func (*MockAccountManager) DeleteRule ¶
func (am *MockAccountManager) DeleteRule(ctx context.Context, accountID, ruleID, userID string) error
DeleteRule mock implementation of DeleteRule from server.AccountManager interface
func (*MockAccountManager) DeleteSetupKey ¶ added in v0.31.0
func (am *MockAccountManager) DeleteSetupKey(ctx context.Context, accountID, userID, keyID string) error
func (*MockAccountManager) DeleteUser ¶ added in v0.17.0
func (am *MockAccountManager) DeleteUser(ctx context.Context, accountID string, initiatorUserID string, targetUserID string) error
DeleteUser mocks DeleteUser of the AccountManager interface
func (*MockAccountManager) DeleteUserInvite ¶ added in v0.64.2
func (am *MockAccountManager) DeleteUserInvite(ctx context.Context, accountID, initiatorUserID, inviteID string) error
func (*MockAccountManager) FindExistingPostureCheck ¶ added in v0.28.0
func (am *MockAccountManager) FindExistingPostureCheck(accountID string, checks *posture.ChecksDefinition) (*posture.Checks, error)
FindExistingPostureCheck mocks FindExistingPostureCheck of the AccountManager interface
func (*MockAccountManager) GetAccount ¶ added in v0.30.0
func (*MockAccountManager) GetAccountByID ¶ added in v0.30.0
func (am *MockAccountManager) GetAccountByID(ctx context.Context, accountID string, userID string) (*types.Account, error)
GetAccountByID mocks GetAccountByID of the AccountManager interface
func (*MockAccountManager) GetAccountIDByUserID ¶ added in v0.30.0
func (am *MockAccountManager) GetAccountIDByUserID(ctx context.Context, userAuth auth.UserAuth) (string, error)
GetAccountIDByUserID mock implementation of GetAccountIDByUserID from server.AccountManager interface
func (*MockAccountManager) GetAccountIDForPeerKey ¶ added in v0.28.4
func (am *MockAccountManager) GetAccountIDForPeerKey(ctx context.Context, peerKey string) (string, error)
GetAccountIDForPeerKey mocks GetAccountIDForPeerKey of the AccountManager interface
func (*MockAccountManager) GetAccountIDFromUserAuth ¶ added in v0.37.0
func (*MockAccountManager) GetAccountMeta ¶ added in v0.42.0
func (am *MockAccountManager) GetAccountMeta(ctx context.Context, accountID string, userID string) (*types.AccountMeta, error)
GetAccountByID mocks GetAccountByID of the AccountManager interface
func (*MockAccountManager) GetAccountOnboarding ¶ added in v0.50.0
func (am *MockAccountManager) GetAccountOnboarding(ctx context.Context, accountID string, userID string) (*types.AccountOnboarding, error)
GetAccountOnboarding mocks GetAccountOnboarding of the AccountManager interface
func (*MockAccountManager) GetAccountSettings ¶ added in v0.30.0
func (*MockAccountManager) GetAllConnectedPeers ¶ added in v0.23.9
func (am *MockAccountManager) GetAllConnectedPeers() (map[string]struct{}, error)
GetAllConnectedPeers mocks GetAllConnectedPeers of the AccountManager interface
func (*MockAccountManager) GetAllGroups ¶ added in v0.26.4
func (am *MockAccountManager) GetAllGroups(ctx context.Context, accountID, userID string) ([]*types.Group, error)
GetAllGroups mock implementation of GetAllGroups from server.AccountManager interface
func (*MockAccountManager) GetAllPATs ¶ added in v0.14.6
func (am *MockAccountManager) GetAllPATs(ctx context.Context, accountID string, initiatorUserID string, targetUserID string) ([]*types.PersonalAccessToken, error)
GetAllPATs mock implementation of GetAllPATs from server.AccountManager interface
func (*MockAccountManager) GetAllPeerJobs ¶ added in v0.64.0
func (*MockAccountManager) GetCurrentUserInfo ¶ added in v0.41.1
func (am *MockAccountManager) GetCurrentUserInfo(ctx context.Context, userAuth auth.UserAuth) (*users.UserInfoWithPermissions, error)
func (*MockAccountManager) GetDNSDomain ¶ added in v0.10.10
func (am *MockAccountManager) GetDNSDomain(settings *types.Settings) string
GetDNSDomain mocks GetDNSDomain of the AccountManager interface
func (*MockAccountManager) GetDNSSettings ¶ added in v0.12.0
func (am *MockAccountManager) GetDNSSettings(ctx context.Context, accountID string, userID string) (*types.DNSSettings, error)
GetDNSSettings mocks GetDNSSettings of the AccountManager interface
func (*MockAccountManager) GetEvents ¶ added in v0.12.0
func (am *MockAccountManager) GetEvents(ctx context.Context, accountID, userID string) ([]*activity.Event, error)
GetEvents mocks GetEvents of the AccountManager interface
func (*MockAccountManager) GetExternalCacheManager ¶ added in v0.24.3
func (am *MockAccountManager) GetExternalCacheManager() account.ExternalCacheManager
GetExternalCacheManager mocks GetExternalCacheManager of the AccountManager interface
func (*MockAccountManager) GetGroup ¶
func (am *MockAccountManager) GetGroup(ctx context.Context, accountId, groupID, userID string) (*types.Group, error)
GetGroup mock implementation of GetGroup from server.AccountManager interface
func (*MockAccountManager) GetGroupByName ¶ added in v0.25.5
func (am *MockAccountManager) GetGroupByName(ctx context.Context, groupName, accountID, userID string) (*types.Group, error)
GetGroupByName mock implementation of GetGroupByName from server.AccountManager interface
func (*MockAccountManager) GetIdentityProvider ¶ added in v0.62.0
func (am *MockAccountManager) GetIdentityProvider(ctx context.Context, accountID, idpID, userID string) (*types.IdentityProvider, error)
GetIdentityProvider mocks GetIdentityProvider of the AccountManager interface
func (*MockAccountManager) GetIdentityProviders ¶ added in v0.62.0
func (am *MockAccountManager) GetIdentityProviders(ctx context.Context, accountID, userID string) ([]*types.IdentityProvider, error)
GetIdentityProviders mocks GetIdentityProviders of the AccountManager interface
func (*MockAccountManager) GetIdpManager ¶ added in v0.26.3
func (am *MockAccountManager) GetIdpManager() idp.Manager
GetIdpManager mocks GetIdpManager of the AccountManager interface
func (*MockAccountManager) GetNameServerGroup ¶ added in v0.9.8
func (am *MockAccountManager) GetNameServerGroup(ctx context.Context, accountID, userID, nsGroupID string) (*nbdns.NameServerGroup, error)
GetNameServerGroup mocks GetNameServerGroup of the AccountManager interface
func (*MockAccountManager) GetNetworkMap ¶
func (am *MockAccountManager) GetNetworkMap(ctx context.Context, peerKey string) (*types.NetworkMap, error)
GetNetworkMap mock implementation of GetNetworkMap from server.AccountManager interface
func (*MockAccountManager) GetOrCreateAccountByPrivateDomain ¶ added in v0.46.0
func (*MockAccountManager) GetOrCreateAccountByUser ¶
func (am *MockAccountManager) GetOrCreateAccountByUser( ctx context.Context, userAuth auth.UserAuth, ) (*types.Account, error)
GetOrCreateAccountByUser mock implementation of GetOrCreateAccountByUser from server.AccountManager interface
func (*MockAccountManager) GetOwnerInfo ¶ added in v0.40.0
func (*MockAccountManager) GetPAT ¶ added in v0.14.6
func (am *MockAccountManager) GetPAT(ctx context.Context, accountID string, initiatorUserID string, targetUserID string, tokenID string) (*types.PersonalAccessToken, error)
GetPAT mock implementation of GetPAT from server.AccountManager interface
func (*MockAccountManager) GetPeer ¶
func (am *MockAccountManager) GetPeer(ctx context.Context, accountID, peerID, userID string) (*nbpeer.Peer, error)
GetPeer mocks GetPeer of the AccountManager interface
func (*MockAccountManager) GetPeerGroups ¶ added in v0.36.4
func (am *MockAccountManager) GetPeerGroups(ctx context.Context, accountID, peerID string) ([]*types.Group, error)
GetPeerGroups mocks GetPeerGroups of the AccountManager interface
func (*MockAccountManager) GetPeerJobByID ¶ added in v0.64.0
func (*MockAccountManager) GetPeerNetwork ¶ added in v0.8.0
func (am *MockAccountManager) GetPeerNetwork(ctx context.Context, peerKey string) (*types.Network, error)
GetPeerNetwork mock implementation of GetPeerNetwork from server.AccountManager interface
func (*MockAccountManager) GetPeers ¶ added in v0.10.5
func (am *MockAccountManager) GetPeers(ctx context.Context, accountID, userID, nameFilter, ipFilter string) ([]*nbpeer.Peer, error)
GetPeers mocks GetPeers of the AccountManager interface
func (*MockAccountManager) GetPolicy ¶ added in v0.14.5
func (am *MockAccountManager) GetPolicy(ctx context.Context, accountID, policyID, userID string) (*types.Policy, error)
GetPolicy mock implementation of GetPolicy from server.AccountManager interface
func (*MockAccountManager) GetPostureChecks ¶ added in v0.26.0
func (am *MockAccountManager) GetPostureChecks(ctx context.Context, accountID, postureChecksID, userID string) (*posture.Checks, error)
GetPostureChecks mocks GetPostureChecks of the AccountManager interface
func (*MockAccountManager) GetRoute ¶ added in v0.8.9
func (am *MockAccountManager) GetRoute(ctx context.Context, accountID string, routeID route.ID, userID string) (*route.Route, error)
GetRoute mock implementation of GetRoute from server.AccountManager interface
func (*MockAccountManager) GetSetupKey ¶ added in v0.9.2
func (am *MockAccountManager) GetSetupKey(ctx context.Context, accountID, userID, keyID string) (*types.SetupKey, error)
GetSetupKey mocks GetSetupKey of the AccountManager interface
func (*MockAccountManager) GetStore ¶ added in v0.39.0
func (am *MockAccountManager) GetStore() store.Store
func (*MockAccountManager) GetUserByID ¶ added in v0.30.0
GetUserByID mocks GetUserByID of the AccountManager interface
func (*MockAccountManager) GetUserFromUserAuth ¶ added in v0.37.0
func (am *MockAccountManager) GetUserFromUserAuth(ctx context.Context, userAuth auth.UserAuth) (*types.User, error)
GetUser mock implementation of GetUser from server.AccountManager interface
func (*MockAccountManager) GetUserIDByPeerKey ¶ added in v0.61.1
func (*MockAccountManager) GetUserInviteInfo ¶ added in v0.64.2
func (am *MockAccountManager) GetUserInviteInfo(ctx context.Context, token string) (*types.UserInviteInfo, error)
func (*MockAccountManager) GetUsersFromAccount ¶
func (am *MockAccountManager) GetUsersFromAccount(ctx context.Context, accountID string, userID string) (map[string]*types.UserInfo, error)
GetUsersFromAccount mock implementation of GetUsersFromAccount from server.AccountManager interface
func (*MockAccountManager) GetValidatedPeers ¶ added in v0.26.5
func (*MockAccountManager) GroupAddPeer ¶
func (am *MockAccountManager) GroupAddPeer(ctx context.Context, accountID, groupID, peerID string) error
GroupAddPeer mock implementation of GroupAddPeer from server.AccountManager interface
func (*MockAccountManager) GroupDeletePeer ¶
func (am *MockAccountManager) GroupDeletePeer(ctx context.Context, accountID, groupID, peerID string) error
GroupDeletePeer mock implementation of GroupDeletePeer from server.AccountManager interface
func (*MockAccountManager) GroupValidation ¶ added in v0.26.5
func (am *MockAccountManager) GroupValidation(ctx context.Context, accountId string, groups []string) (bool, error)
GroupValidation mocks GroupValidation of the AccountManager interface
func (*MockAccountManager) HasConnectedChannel ¶ added in v0.24.4
func (am *MockAccountManager) HasConnectedChannel(peerID string) bool
HasConnectedChannel mocks HasConnectedChannel of the AccountManager interface
func (*MockAccountManager) InviteUser ¶ added in v0.21.9
func (*MockAccountManager) ListNameServerGroups ¶ added in v0.9.8
func (am *MockAccountManager) ListNameServerGroups(ctx context.Context, accountID string, userID string) ([]*nbdns.NameServerGroup, error)
ListNameServerGroups mocks ListNameServerGroups of the AccountManager interface
func (*MockAccountManager) ListPolicies ¶ added in v0.14.5
func (am *MockAccountManager) ListPolicies(ctx context.Context, accountID, userID string) ([]*types.Policy, error)
ListPolicies mock implementation of ListPolicies from server.AccountManager interface
func (*MockAccountManager) ListPostureChecks ¶ added in v0.26.0
func (am *MockAccountManager) ListPostureChecks(ctx context.Context, accountID, userID string) ([]*posture.Checks, error)
ListPostureChecks mocks ListPostureChecks of the AccountManager interface
func (*MockAccountManager) ListRoutes ¶ added in v0.8.9
func (am *MockAccountManager) ListRoutes(ctx context.Context, accountID, userID string) ([]*route.Route, error)
ListRoutes mock implementation of ListRoutes from server.AccountManager interface
func (*MockAccountManager) ListSetupKeys ¶ added in v0.9.2
func (am *MockAccountManager) ListSetupKeys(ctx context.Context, accountID, userID string) ([]*types.SetupKey, error)
ListSetupKeys mocks ListSetupKeys of the AccountManager interface
func (*MockAccountManager) ListUserInvites ¶ added in v0.64.2
func (am *MockAccountManager) ListUserInvites(ctx context.Context, accountID, initiatorUserID string) ([]*types.UserInvite, error)
func (*MockAccountManager) LoginPeer ¶ added in v0.14.3
func (am *MockAccountManager) LoginPeer(ctx context.Context, login types.PeerLogin) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, error)
LoginPeer mocks LoginPeer of the AccountManager interface
func (*MockAccountManager) MarkPeerConnected ¶
func (am *MockAccountManager) MarkPeerConnected(ctx context.Context, peerKey string, connected bool, realIP net.IP, accountID string, syncTime time.Time) error
MarkPeerConnected mock implementation of MarkPeerConnected from server.AccountManager interface
func (*MockAccountManager) OnPeerDisconnected ¶ added in v0.28.7
func (*MockAccountManager) RecalculateNetworkMapCache ¶ added in v0.59.13
func (am *MockAccountManager) RecalculateNetworkMapCache(ctx context.Context, accountID string) error
func (*MockAccountManager) RegenerateUserInvite ¶ added in v0.64.2
func (am *MockAccountManager) RegenerateUserInvite(ctx context.Context, accountID, initiatorUserID, inviteID string, expiresIn int) (*types.UserInvite, error)
func (*MockAccountManager) RejectUser ¶ added in v0.56.0
func (am *MockAccountManager) RejectUser(ctx context.Context, accountID, initiatorUserID, targetUserID string) error
func (*MockAccountManager) SaveDNSSettings ¶ added in v0.12.0
func (am *MockAccountManager) SaveDNSSettings(ctx context.Context, accountID string, userID string, dnsSettingsToSave *types.DNSSettings) error
SaveDNSSettings mocks SaveDNSSettings of the AccountManager interface
func (*MockAccountManager) SaveGroup ¶
func (am *MockAccountManager) SaveGroup(ctx context.Context, accountID, userID string, group *types.Group, create bool) error
SaveGroup mock implementation of SaveGroup from server.AccountManager interface
func (*MockAccountManager) SaveGroups ¶ added in v0.28.5
func (am *MockAccountManager) SaveGroups(ctx context.Context, accountID, userID string, groups []*types.Group, create bool) error
SaveGroups mock implementation of SaveGroups from server.AccountManager interface
func (*MockAccountManager) SaveNameServerGroup ¶ added in v0.9.8
func (am *MockAccountManager) SaveNameServerGroup(ctx context.Context, accountID, userID string, nsGroupToSave *nbdns.NameServerGroup) error
SaveNameServerGroup mocks SaveNameServerGroup of the AccountManager interface
func (*MockAccountManager) SaveOrAddUser ¶ added in v0.24.3
func (am *MockAccountManager) SaveOrAddUser(ctx context.Context, accountID, userID string, user *types.User, addIfNotExists bool) (*types.UserInfo, error)
SaveOrAddUser mocks SaveOrAddUser of the AccountManager interface
func (*MockAccountManager) SaveOrAddUsers ¶ added in v0.28.5
func (am *MockAccountManager) SaveOrAddUsers(ctx context.Context, accountID, userID string, users []*types.User, addIfNotExists bool) ([]*types.UserInfo, error)
SaveOrAddUsers mocks SaveOrAddUsers of the AccountManager interface
func (*MockAccountManager) SavePolicy ¶ added in v0.14.5
func (am *MockAccountManager) SavePolicy(ctx context.Context, accountID, userID string, policy *types.Policy, create bool) (*types.Policy, error)
SavePolicy mock implementation of SavePolicy from server.AccountManager interface
func (*MockAccountManager) SavePostureChecks ¶ added in v0.26.0
func (am *MockAccountManager) SavePostureChecks(ctx context.Context, accountID, userID string, postureChecks *posture.Checks, create bool) (*posture.Checks, error)
SavePostureChecks mocks SavePostureChecks of the AccountManager interface
func (*MockAccountManager) SaveRoute ¶ added in v0.8.9
func (am *MockAccountManager) SaveRoute(ctx context.Context, accountID string, userID string, route *route.Route) error
SaveRoute mock implementation of SaveRoute from server.AccountManager interface
func (*MockAccountManager) SaveSetupKey ¶ added in v0.9.2
func (am *MockAccountManager) SaveSetupKey(ctx context.Context, accountID string, key *types.SetupKey, userID string) (*types.SetupKey, error)
SaveSetupKey mocks SaveSetupKey of the AccountManager interface
func (*MockAccountManager) SaveUser ¶ added in v0.9.4
func (am *MockAccountManager) SaveUser(ctx context.Context, accountID, userID string, user *types.User) (*types.UserInfo, error)
SaveUser mocks SaveUser of the AccountManager interface
func (*MockAccountManager) SetServiceManager ¶ added in v0.65.0
func (am *MockAccountManager) SetServiceManager(serviceManager service.Manager)
func (*MockAccountManager) StoreEvent ¶ added in v0.24.3
func (am *MockAccountManager) StoreEvent(ctx context.Context, initiatorID, targetID, accountID string, activityID activity.ActivityDescriber, meta map[string]any)
StoreEvent mocks StoreEvent of the AccountManager interface
func (*MockAccountManager) SyncAndMarkPeer ¶ added in v0.27.5
func (*MockAccountManager) SyncPeer ¶ added in v0.14.3
func (am *MockAccountManager) SyncPeer(ctx context.Context, sync types.PeerSync, accountID string) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error)
SyncPeer mocks SyncPeer of the AccountManager interface
func (*MockAccountManager) SyncPeerMeta ¶ added in v0.28.0
func (am *MockAccountManager) SyncPeerMeta(ctx context.Context, peerPubKey string, meta nbpeer.PeerSystemMeta) error
SyncPeerMeta mocks SyncPeerMeta of the AccountManager interface
func (*MockAccountManager) SyncUserJWTGroups ¶ added in v0.37.0
func (*MockAccountManager) UpdateAccountOnboarding ¶ added in v0.50.0
func (am *MockAccountManager) UpdateAccountOnboarding(ctx context.Context, accountID string, userID string, onboarding *types.AccountOnboarding) (*types.AccountOnboarding, error)
UpdateAccountOnboarding mocks UpdateAccountOnboarding of the AccountManager interface
func (*MockAccountManager) UpdateAccountPeers ¶ added in v0.35.0
func (am *MockAccountManager) UpdateAccountPeers(ctx context.Context, accountID string, reason types.UpdateReason)
func (*MockAccountManager) UpdateAccountSettings ¶ added in v0.14.0
func (am *MockAccountManager) UpdateAccountSettings(ctx context.Context, accountID, userID string, newSettings *types.Settings) (*types.Settings, error)
UpdateAccountSettings mocks UpdateAccountSettings of the AccountManager interface
func (*MockAccountManager) UpdateGroup ¶ added in v0.7.0
func (*MockAccountManager) UpdateGroups ¶ added in v0.53.0
func (*MockAccountManager) UpdateIdentityProvider ¶ added in v0.62.0
func (am *MockAccountManager) UpdateIdentityProvider(ctx context.Context, accountID, idpID, userID string, idp *types.IdentityProvider) (*types.IdentityProvider, error)
UpdateIdentityProvider mocks UpdateIdentityProvider of the AccountManager interface
func (*MockAccountManager) UpdateIntegratedValidator ¶ added in v0.52.0
func (am *MockAccountManager) UpdateIntegratedValidator(ctx context.Context, accountID, userID, validator string, groups []string) error
UpdateIntegratedValidator mocks UpdateIntegratedApprovalGroups of the AccountManager interface
func (*MockAccountManager) UpdatePeer ¶ added in v0.8.0
func (am *MockAccountManager) UpdatePeer(ctx context.Context, accountID, userID string, peer *nbpeer.Peer) (*nbpeer.Peer, error)
UpdatePeer mocks UpdatePeerFunc function of the account manager
func (*MockAccountManager) UpdatePeerIP ¶ added in v0.53.0
func (*MockAccountManager) UpdatePeerIPv6 ¶ added in v0.71.0
func (*MockAccountManager) UpdatePeerMeta ¶
func (am *MockAccountManager) UpdatePeerMeta(ctx context.Context, peerID string, meta nbpeer.PeerSystemMeta) error
UpdatePeerMeta mock implementation of UpdatePeerMeta from server.AccountManager interface
func (*MockAccountManager) UpdateToPrimaryAccount ¶ added in v0.40.0
func (am *MockAccountManager) UpdateToPrimaryAccount(ctx context.Context, accountId string) error
func (*MockAccountManager) UpdateUserPassword ¶ added in v0.64.0
func (am *MockAccountManager) UpdateUserPassword(ctx context.Context, accountID, currentUserID, targetUserID string, oldPassword, newPassword string) error
UpdateUserPassword mocks UpdateUserPassword of the AccountManager interface