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
- type MockAccountManager
- func (am *MockAccountManager) AddPeer(setupKey string, userId string, peer *nbpeer.Peer) (*nbpeer.Peer, *server.NetworkMap, error)
- func (am *MockAccountManager) CancelPeerRoutines(peer *nbpeer.Peer) error
- func (am *MockAccountManager) CheckUserAccessByJWTGroups(claims jwtclaims.AuthorizationClaims) error
- func (am *MockAccountManager) CreateNameServerGroup(accountID string, name, description string, nameServerList []nbdns.NameServer, ...) (*nbdns.NameServerGroup, error)
- func (am *MockAccountManager) CreatePAT(accountID string, initiatorUserID string, targetUserID string, name string, ...) (*server.PersonalAccessTokenGenerated, error)
- func (am *MockAccountManager) CreateRoute(accountID, prefix, peerID string, peerGroupIDs []string, description string, ...) (*route.Route, error)
- func (am *MockAccountManager) CreateSetupKey(accountID string, keyName string, keyType server.SetupKeyType, ...) (*server.SetupKey, error)
- func (am *MockAccountManager) CreateUser(accountID, userID string, invite *server.UserInfo) (*server.UserInfo, error)
- func (am *MockAccountManager) DeleteAccount(accountID, userID string) error
- func (am *MockAccountManager) DeleteGroup(accountId, userId, groupID string) error
- func (am *MockAccountManager) DeleteNameServerGroup(accountID, nsGroupID, userID string) error
- func (am *MockAccountManager) DeletePAT(accountID string, initiatorUserID string, targetUserID string, tokenID string) error
- func (am *MockAccountManager) DeletePeer(accountID, peerID, userID string) error
- func (am *MockAccountManager) DeletePolicy(accountID, policyID, userID string) error
- func (am *MockAccountManager) DeletePostureChecks(accountID, postureChecksID, userID string) error
- func (am *MockAccountManager) DeleteRoute(accountID string, routeID route.ID, userID string) error
- func (am *MockAccountManager) DeleteRule(accountID, ruleID, userID string) error
- func (am *MockAccountManager) DeleteUser(accountID string, initiatorUserID string, targetUserID string) error
- func (am *MockAccountManager) FindExistingPostureCheck(accountID string, checks *posture.ChecksDefinition) (*posture.Checks, error)
- func (am *MockAccountManager) GetAccountByUserOrAccountID(userId, accountId, domain string) (*server.Account, error)
- func (am *MockAccountManager) GetAccountFromPAT(pat string) (*server.Account, *server.User, *server.PersonalAccessToken, error)
- func (am *MockAccountManager) GetAccountFromToken(claims jwtclaims.AuthorizationClaims) (*server.Account, *server.User, error)
- func (am *MockAccountManager) GetAllConnectedPeers() (map[string]struct{}, error)
- func (am *MockAccountManager) GetAllGroups(accountID, userID string) ([]*group.Group, error)
- func (am *MockAccountManager) GetAllPATs(accountID string, initiatorUserID string, targetUserID string) ([]*server.PersonalAccessToken, error)
- func (am *MockAccountManager) GetDNSDomain() string
- func (am *MockAccountManager) GetDNSSettings(accountID string, userID string) (*server.DNSSettings, error)
- func (am *MockAccountManager) GetEvents(accountID, userID string) ([]*activity.Event, error)
- func (am *MockAccountManager) GetExternalCacheManager() server.ExternalCacheManager
- func (am *MockAccountManager) GetGroup(accountId, groupID, userID string) (*group.Group, error)
- func (am *MockAccountManager) GetGroupByName(accountID, groupName string) (*group.Group, error)
- func (am *MockAccountManager) GetIdpManager() idp.Manager
- func (am *MockAccountManager) GetNameServerGroup(accountID, userID, nsGroupID string) (*nbdns.NameServerGroup, error)
- func (am *MockAccountManager) GetNetworkMap(peerKey string) (*server.NetworkMap, error)
- func (am *MockAccountManager) GetOrCreateAccountByUser(userId, domain string) (*server.Account, error)
- func (am *MockAccountManager) GetPAT(accountID string, initiatorUserID string, targetUserID string, tokenID string) (*server.PersonalAccessToken, error)
- func (am *MockAccountManager) GetPeer(accountID, peerID, userID string) (*nbpeer.Peer, error)
- func (am *MockAccountManager) GetPeerNetwork(peerKey string) (*server.Network, error)
- func (am *MockAccountManager) GetPeers(accountID, userID string) ([]*nbpeer.Peer, error)
- func (am *MockAccountManager) GetPolicy(accountID, policyID, userID string) (*server.Policy, error)
- func (am *MockAccountManager) GetPostureChecks(accountID, postureChecksID, userID string) (*posture.Checks, error)
- func (am *MockAccountManager) GetRoute(accountID string, routeID route.ID, userID string) (*route.Route, error)
- func (am *MockAccountManager) GetSetupKey(accountID, userID, keyID string) (*server.SetupKey, error)
- func (am *MockAccountManager) GetUser(claims jwtclaims.AuthorizationClaims) (*server.User, error)
- func (am *MockAccountManager) GetUsersFromAccount(accountID string, userID string) ([]*server.UserInfo, error)
- func (am *MockAccountManager) GetValidatedPeers(account *server.Account) (map[string]struct{}, error)
- func (am *MockAccountManager) GroupAddPeer(accountID, groupID, peerID string) error
- func (am *MockAccountManager) GroupDeletePeer(accountID, groupID, peerID string) error
- func (am *MockAccountManager) GroupValidation(accountId string, groups []string) (bool, error)
- func (am *MockAccountManager) HasConnectedChannel(peerID string) bool
- func (am *MockAccountManager) InviteUser(accountID string, initiatorUserID string, targetUserID string) error
- func (am *MockAccountManager) ListGroups(accountID string) ([]*group.Group, error)
- func (am *MockAccountManager) ListNameServerGroups(accountID string, userID string) ([]*nbdns.NameServerGroup, error)
- func (am *MockAccountManager) ListPolicies(accountID, userID string) ([]*server.Policy, error)
- func (am *MockAccountManager) ListPostureChecks(accountID, userID string) ([]*posture.Checks, error)
- func (am *MockAccountManager) ListRoutes(accountID, userID string) ([]*route.Route, error)
- func (am *MockAccountManager) ListSetupKeys(accountID, userID string) ([]*server.SetupKey, error)
- func (am *MockAccountManager) ListUsers(accountID string) ([]*server.User, error)
- func (am *MockAccountManager) LoginPeer(login server.PeerLogin) (*nbpeer.Peer, *server.NetworkMap, error)
- func (am *MockAccountManager) MarkPATUsed(pat string) error
- func (am *MockAccountManager) MarkPeerConnected(peerKey string, connected bool, realIP net.IP, account *server.Account) error
- func (am *MockAccountManager) SaveDNSSettings(accountID string, userID string, dnsSettingsToSave *server.DNSSettings) error
- func (am *MockAccountManager) SaveGroup(accountID, userID string, group *group.Group) error
- func (am *MockAccountManager) SaveNameServerGroup(accountID, userID string, nsGroupToSave *nbdns.NameServerGroup) error
- func (am *MockAccountManager) SaveOrAddUser(accountID, userID string, user *server.User, addIfNotExists bool) (*server.UserInfo, error)
- func (am *MockAccountManager) SavePolicy(accountID, userID string, policy *server.Policy) error
- func (am *MockAccountManager) SavePostureChecks(accountID, userID string, postureChecks *posture.Checks) error
- func (am *MockAccountManager) SaveRoute(accountID string, userID string, route *route.Route) error
- func (am *MockAccountManager) SaveSetupKey(accountID string, key *server.SetupKey, userID string) (*server.SetupKey, error)
- func (am *MockAccountManager) SaveUser(accountID, userID string, user *server.User) (*server.UserInfo, error)
- func (am *MockAccountManager) StoreEvent(initiatorID, targetID, accountID string, activityID activity.ActivityDescriber, ...)
- func (am *MockAccountManager) SyncAndMarkPeer(peerPubKey string, realIP net.IP) (*nbpeer.Peer, *server.NetworkMap, error)
- func (am *MockAccountManager) SyncPeer(sync server.PeerSync, account *server.Account) (*nbpeer.Peer, *server.NetworkMap, error)
- func (am *MockAccountManager) UpdateAccountSettings(accountID, userID string, newSettings *server.Settings) (*server.Account, error)
- func (am *MockAccountManager) UpdateIntegratedValidatorGroups(accountID string, userID string, groups []string) error
- func (am *MockAccountManager) UpdatePeer(accountID, userID string, peer *nbpeer.Peer) (*nbpeer.Peer, error)
- func (am *MockAccountManager) UpdatePeerMeta(peerID string, meta nbpeer.PeerSystemMeta) error
- func (am *MockAccountManager) UpdatePeerSSHKey(peerID string, sshKey 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) }
func (ManagementServiceServerMock) GetDeviceAuthorizationFlow ¶
func (m ManagementServiceServerMock) GetDeviceAuthorizationFlow(ctx context.Context, req *proto.EncryptedMessage) (*proto.EncryptedMessage, error)
func (ManagementServiceServerMock) GetPKCEAuthorizationFlow ¶
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
type MockAccountManager ¶
type MockAccountManager struct { GetOrCreateAccountByUserFunc func(userId, domain string) (*server.Account, error) CreateSetupKeyFunc func(accountId string, keyName string, keyType server.SetupKeyType, expiresIn time.Duration, autoGroups []string, usageLimit int, userID string, ephemeral bool) (*server.SetupKey, error) GetSetupKeyFunc func(accountID, userID, keyID string) (*server.SetupKey, error) GetAccountByUserOrAccountIdFunc func(userId, accountId, domain string) (*server.Account, error) GetUserFunc func(claims jwtclaims.AuthorizationClaims) (*server.User, error) ListUsersFunc func(accountID string) ([]*server.User, error) GetPeersFunc func(accountID, userID string) ([]*nbpeer.Peer, error) MarkPeerConnectedFunc func(peerKey string, connected bool, realIP net.IP) error SyncAndMarkPeerFunc func(peerPubKey string, realIP net.IP) (*nbpeer.Peer, *server.NetworkMap, error) DeletePeerFunc func(accountID, peerKey, userID string) error GetNetworkMapFunc func(peerKey string) (*server.NetworkMap, error) GetPeerNetworkFunc func(peerKey string) (*server.Network, error) AddPeerFunc func(setupKey string, userId string, peer *nbpeer.Peer) (*nbpeer.Peer, *server.NetworkMap, error) GetGroupFunc func(accountID, groupID, userID string) (*group.Group, error) GetAllGroupsFunc func(accountID, userID string) ([]*group.Group, error) GetGroupByNameFunc func(accountID, groupName string) (*group.Group, error) SaveGroupFunc func(accountID, userID string, group *group.Group) error DeleteGroupFunc func(accountID, userId, groupID string) error ListGroupsFunc func(accountID string) ([]*group.Group, error) GroupAddPeerFunc func(accountID, groupID, peerID string) error GroupDeletePeerFunc func(accountID, groupID, peerID string) error DeleteRuleFunc func(accountID, ruleID, userID string) error GetPolicyFunc func(accountID, policyID, userID string) (*server.Policy, error) SavePolicyFunc func(accountID, userID string, policy *server.Policy) error DeletePolicyFunc func(accountID, policyID, userID string) error ListPoliciesFunc func(accountID, userID string) ([]*server.Policy, error) GetUsersFromAccountFunc func(accountID, userID string) ([]*server.UserInfo, error) GetAccountFromPATFunc func(pat string) (*server.Account, *server.User, *server.PersonalAccessToken, error) MarkPATUsedFunc func(pat string) error UpdatePeerMetaFunc func(peerID string, meta nbpeer.PeerSystemMeta) error UpdatePeerSSHKeyFunc func(peerID string, sshKey string) error UpdatePeerFunc func(accountID, userID string, peer *nbpeer.Peer) (*nbpeer.Peer, error) CreateRouteFunc func(accountID, prefix, peer string, peerGroups []string, description string, netID route.NetID, masquerade bool, metric int, groups []string, enabled bool, userID string) (*route.Route, error) GetRouteFunc func(accountID string, routeID route.ID, userID string) (*route.Route, error) SaveRouteFunc func(accountID string, userID string, route *route.Route) error DeleteRouteFunc func(accountID string, routeID route.ID, userID string) error ListRoutesFunc func(accountID, userID string) ([]*route.Route, error) SaveSetupKeyFunc func(accountID string, key *server.SetupKey, userID string) (*server.SetupKey, error) ListSetupKeysFunc func(accountID, userID string) ([]*server.SetupKey, error) SaveUserFunc func(accountID, userID string, user *server.User) (*server.UserInfo, error) SaveOrAddUserFunc func(accountID, userID string, user *server.User, addIfNotExists bool) (*server.UserInfo, error) DeleteUserFunc func(accountID string, initiatorUserID string, targetUserID string) error CreatePATFunc func(accountID string, initiatorUserID string, targetUserId string, tokenName string, expiresIn int) (*server.PersonalAccessTokenGenerated, error) DeletePATFunc func(accountID string, initiatorUserID string, targetUserId string, tokenID string) error GetPATFunc func(accountID string, initiatorUserID string, targetUserId string, tokenID string) (*server.PersonalAccessToken, error) GetAllPATsFunc func(accountID string, initiatorUserID string, targetUserId string) ([]*server.PersonalAccessToken, error) GetNameServerGroupFunc func(accountID, userID, nsGroupID string) (*nbdns.NameServerGroup, error) CreateNameServerGroupFunc func(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(accountID, userID string, nsGroupToSave *nbdns.NameServerGroup) error DeleteNameServerGroupFunc func(accountID, nsGroupID, userID string) error ListNameServerGroupsFunc func(accountID string, userID string) ([]*nbdns.NameServerGroup, error) CreateUserFunc func(accountID, userID string, key *server.UserInfo) (*server.UserInfo, error) GetAccountFromTokenFunc func(claims jwtclaims.AuthorizationClaims) (*server.Account, *server.User, error) CheckUserAccessByJWTGroupsFunc func(claims jwtclaims.AuthorizationClaims) error DeleteAccountFunc func(accountID, userID string) error GetDNSDomainFunc func() string StoreEventFunc func(initiatorID, targetID, accountID string, activityID activity.ActivityDescriber, meta map[string]any) GetEventsFunc func(accountID, userID string) ([]*activity.Event, error) GetDNSSettingsFunc func(accountID, userID string) (*server.DNSSettings, error) SaveDNSSettingsFunc func(accountID, userID string, dnsSettingsToSave *server.DNSSettings) error GetPeerFunc func(accountID, peerID, userID string) (*nbpeer.Peer, error) UpdateAccountSettingsFunc func(accountID, userID string, newSettings *server.Settings) (*server.Account, error) LoginPeerFunc func(login server.PeerLogin) (*nbpeer.Peer, *server.NetworkMap, error) SyncPeerFunc func(sync server.PeerSync, account *server.Account) (*nbpeer.Peer, *server.NetworkMap, error) InviteUserFunc func(accountID string, initiatorUserID string, targetUserEmail string) error GetAllConnectedPeersFunc func() (map[string]struct{}, error) HasConnectedChannelFunc func(peerID string) bool GetExternalCacheManagerFunc func() server.ExternalCacheManager GetPostureChecksFunc func(accountID, postureChecksID, userID string) (*posture.Checks, error) SavePostureChecksFunc func(accountID, userID string, postureChecks *posture.Checks) error DeletePostureChecksFunc func(accountID, postureChecksID, userID string) error ListPostureChecksFunc func(accountID, userID string) ([]*posture.Checks, error) GetIdpManagerFunc func() idp.Manager UpdateIntegratedValidatorGroupsFunc func(accountID string, userID string, groups []string) error GroupValidationFunc func(accountId string, groups []string) (bool, error) FindExistingPostureCheckFunc func(accountID string, checks *posture.ChecksDefinition) (*posture.Checks, error) }
func (*MockAccountManager) AddPeer ¶
func (am *MockAccountManager) AddPeer( setupKey string, userId string, peer *nbpeer.Peer, ) (*nbpeer.Peer, *server.NetworkMap, error)
AddPeer mock implementation of AddPeer from server.AccountManager interface
func (*MockAccountManager) CancelPeerRoutines ¶
func (am *MockAccountManager) CancelPeerRoutines(peer *nbpeer.Peer) error
func (*MockAccountManager) CheckUserAccessByJWTGroups ¶
func (am *MockAccountManager) CheckUserAccessByJWTGroups(claims jwtclaims.AuthorizationClaims) error
func (*MockAccountManager) CreateNameServerGroup ¶
func (am *MockAccountManager) CreateNameServerGroup(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 ¶
func (am *MockAccountManager) CreatePAT(accountID string, initiatorUserID string, targetUserID string, name string, expiresIn int) (*server.PersonalAccessTokenGenerated, error)
CreatePAT mock implementation of GetPAT from server.AccountManager interface
func (*MockAccountManager) CreateRoute ¶
func (am *MockAccountManager) CreateRoute(accountID, prefix, peerID string, peerGroupIDs []string, description string, netID route.NetID, masquerade bool, metric int, groups []string, enabled bool, userID string) (*route.Route, error)
CreateRoute mock implementation of CreateRoute from server.AccountManager interface
func (*MockAccountManager) CreateSetupKey ¶
func (am *MockAccountManager) CreateSetupKey( accountID string, keyName string, keyType server.SetupKeyType, expiresIn time.Duration, autoGroups []string, usageLimit int, userID string, ephemeral bool, ) (*server.SetupKey, error)
CreateSetupKey mock implementation of CreateSetupKey from server.AccountManager interface
func (*MockAccountManager) CreateUser ¶
func (am *MockAccountManager) CreateUser(accountID, userID string, invite *server.UserInfo) (*server.UserInfo, error)
CreateUser mocks CreateUser of the AccountManager interface
func (*MockAccountManager) DeleteAccount ¶
func (am *MockAccountManager) DeleteAccount(accountID, userID string) error
DeleteAccount mock implementation of DeleteAccount from server.AccountManager interface
func (*MockAccountManager) DeleteGroup ¶
func (am *MockAccountManager) DeleteGroup(accountId, userId, groupID string) error
DeleteGroup mock implementation of DeleteGroup from server.AccountManager interface
func (*MockAccountManager) DeleteNameServerGroup ¶
func (am *MockAccountManager) DeleteNameServerGroup(accountID, nsGroupID, userID string) error
DeleteNameServerGroup mocks DeleteNameServerGroup of the AccountManager interface
func (*MockAccountManager) DeletePAT ¶
func (am *MockAccountManager) DeletePAT(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(accountID, peerID, userID string) error
DeletePeer mock implementation of DeletePeer from server.AccountManager interface
func (*MockAccountManager) DeletePolicy ¶
func (am *MockAccountManager) DeletePolicy(accountID, policyID, userID string) error
DeletePolicy mock implementation of DeletePolicy from server.AccountManager interface
func (*MockAccountManager) DeletePostureChecks ¶
func (am *MockAccountManager) DeletePostureChecks(accountID, postureChecksID, userID string) error
DeletePostureChecks mocks DeletePostureChecks of the AccountManager interface
func (*MockAccountManager) DeleteRoute ¶
DeleteRoute mock implementation of DeleteRoute from server.AccountManager interface
func (*MockAccountManager) DeleteRule ¶
func (am *MockAccountManager) DeleteRule(accountID, ruleID, userID string) error
DeleteRule mock implementation of DeleteRule from server.AccountManager interface
func (*MockAccountManager) DeleteUser ¶
func (am *MockAccountManager) DeleteUser(accountID string, initiatorUserID string, targetUserID string) error
DeleteUser mocks DeleteUser of the AccountManager interface
func (*MockAccountManager) FindExistingPostureCheck ¶
func (am *MockAccountManager) FindExistingPostureCheck(accountID string, checks *posture.ChecksDefinition) (*posture.Checks, error)
FindExistingPostureCheck mocks FindExistingPostureCheck of the AccountManager interface
func (*MockAccountManager) GetAccountByUserOrAccountID ¶
func (am *MockAccountManager) GetAccountByUserOrAccountID( userId, accountId, domain string, ) (*server.Account, error)
GetAccountByUserOrAccountID mock implementation of GetAccountByUserOrAccountID from server.AccountManager interface
func (*MockAccountManager) GetAccountFromPAT ¶
func (am *MockAccountManager) GetAccountFromPAT(pat string) (*server.Account, *server.User, *server.PersonalAccessToken, error)
GetAccountFromPAT mock implementation of GetAccountFromPAT from server.AccountManager interface
func (*MockAccountManager) GetAccountFromToken ¶
func (am *MockAccountManager) GetAccountFromToken(claims jwtclaims.AuthorizationClaims) (*server.Account, *server.User, error, )
GetAccountFromToken mocks GetAccountFromToken of the AccountManager interface
func (*MockAccountManager) GetAllConnectedPeers ¶
func (am *MockAccountManager) GetAllConnectedPeers() (map[string]struct{}, error)
GetAllConnectedPeers mocks GetAllConnectedPeers of the AccountManager interface
func (*MockAccountManager) GetAllGroups ¶
func (am *MockAccountManager) GetAllGroups(accountID, userID string) ([]*group.Group, error)
GetAllGroups mock implementation of GetAllGroups from server.AccountManager interface
func (*MockAccountManager) GetAllPATs ¶
func (am *MockAccountManager) GetAllPATs(accountID string, initiatorUserID string, targetUserID string) ([]*server.PersonalAccessToken, error)
GetAllPATs mock implementation of GetAllPATs from server.AccountManager interface
func (*MockAccountManager) GetDNSDomain ¶
func (am *MockAccountManager) GetDNSDomain() string
GetDNSDomain mocks GetDNSDomain of the AccountManager interface
func (*MockAccountManager) GetDNSSettings ¶
func (am *MockAccountManager) GetDNSSettings(accountID string, userID string) (*server.DNSSettings, error)
GetDNSSettings mocks GetDNSSettings of the AccountManager interface
func (*MockAccountManager) GetEvents ¶
func (am *MockAccountManager) GetEvents(accountID, userID string) ([]*activity.Event, error)
GetEvents mocks GetEvents of the AccountManager interface
func (*MockAccountManager) GetExternalCacheManager ¶
func (am *MockAccountManager) GetExternalCacheManager() server.ExternalCacheManager
GetExternalCacheManager mocks GetExternalCacheManager of the AccountManager interface
func (*MockAccountManager) GetGroup ¶
func (am *MockAccountManager) GetGroup(accountId, groupID, userID string) (*group.Group, error)
GetGroup mock implementation of GetGroup from server.AccountManager interface
func (*MockAccountManager) GetGroupByName ¶
func (am *MockAccountManager) GetGroupByName(accountID, groupName string) (*group.Group, error)
GetGroupByName mock implementation of GetGroupByName from server.AccountManager interface
func (*MockAccountManager) GetIdpManager ¶
func (am *MockAccountManager) GetIdpManager() idp.Manager
GetIdpManager mocks GetIdpManager of the AccountManager interface
func (*MockAccountManager) GetNameServerGroup ¶
func (am *MockAccountManager) GetNameServerGroup(accountID, userID, nsGroupID string) (*nbdns.NameServerGroup, error)
GetNameServerGroup mocks GetNameServerGroup of the AccountManager interface
func (*MockAccountManager) GetNetworkMap ¶
func (am *MockAccountManager) GetNetworkMap(peerKey string) (*server.NetworkMap, error)
GetNetworkMap mock implementation of GetNetworkMap from server.AccountManager interface
func (*MockAccountManager) GetOrCreateAccountByUser ¶
func (am *MockAccountManager) GetOrCreateAccountByUser( userId, domain string, ) (*server.Account, error)
GetOrCreateAccountByUser mock implementation of GetOrCreateAccountByUser from server.AccountManager interface
func (*MockAccountManager) GetPAT ¶
func (am *MockAccountManager) GetPAT(accountID string, initiatorUserID string, targetUserID string, tokenID string) (*server.PersonalAccessToken, error)
GetPAT mock implementation of GetPAT from server.AccountManager interface
func (*MockAccountManager) GetPeer ¶
func (am *MockAccountManager) GetPeer(accountID, peerID, userID string) (*nbpeer.Peer, error)
GetPeer mocks GetPeer of the AccountManager interface
func (*MockAccountManager) GetPeerNetwork ¶
func (am *MockAccountManager) GetPeerNetwork(peerKey string) (*server.Network, error)
GetPeerNetwork mock implementation of GetPeerNetwork from server.AccountManager interface
func (*MockAccountManager) GetPeers ¶
func (am *MockAccountManager) GetPeers(accountID, userID string) ([]*nbpeer.Peer, error)
GetPeers mocks GetPeers of the AccountManager interface
func (*MockAccountManager) GetPolicy ¶
func (am *MockAccountManager) GetPolicy(accountID, policyID, userID string) (*server.Policy, error)
GetPolicy mock implementation of GetPolicy from server.AccountManager interface
func (*MockAccountManager) GetPostureChecks ¶
func (am *MockAccountManager) GetPostureChecks(accountID, postureChecksID, userID string) (*posture.Checks, error)
GetPostureChecks mocks GetPostureChecks of the AccountManager interface
func (*MockAccountManager) GetRoute ¶
func (am *MockAccountManager) GetRoute(accountID string, routeID route.ID, userID string) (*route.Route, error)
GetRoute mock implementation of GetRoute from server.AccountManager interface
func (*MockAccountManager) GetSetupKey ¶
func (am *MockAccountManager) GetSetupKey(accountID, userID, keyID string) (*server.SetupKey, error)
GetSetupKey mocks GetSetupKey of the AccountManager interface
func (*MockAccountManager) GetUser ¶
func (am *MockAccountManager) GetUser(claims jwtclaims.AuthorizationClaims) (*server.User, error)
GetUser mock implementation of GetUser from server.AccountManager interface
func (*MockAccountManager) GetUsersFromAccount ¶
func (am *MockAccountManager) GetUsersFromAccount(accountID string, userID string) ([]*server.UserInfo, error)
GetUsersFromAccount mock implementation of GetUsersFromAccount from server.AccountManager interface
func (*MockAccountManager) GetValidatedPeers ¶
func (am *MockAccountManager) GetValidatedPeers(account *server.Account) (map[string]struct{}, error)
func (*MockAccountManager) GroupAddPeer ¶
func (am *MockAccountManager) GroupAddPeer(accountID, groupID, peerID string) error
GroupAddPeer mock implementation of GroupAddPeer from server.AccountManager interface
func (*MockAccountManager) GroupDeletePeer ¶
func (am *MockAccountManager) GroupDeletePeer(accountID, groupID, peerID string) error
GroupDeletePeer mock implementation of GroupDeletePeer from server.AccountManager interface
func (*MockAccountManager) GroupValidation ¶
func (am *MockAccountManager) GroupValidation(accountId string, groups []string) (bool, error)
GroupValidation mocks GroupValidation of the AccountManager interface
func (*MockAccountManager) HasConnectedChannel ¶
func (am *MockAccountManager) HasConnectedChannel(peerID string) bool
HasConnectedChannel mocks HasConnectedChannel of the AccountManager interface
func (*MockAccountManager) InviteUser ¶
func (am *MockAccountManager) InviteUser(accountID string, initiatorUserID string, targetUserID string) error
func (*MockAccountManager) ListGroups ¶
func (am *MockAccountManager) ListGroups(accountID string) ([]*group.Group, error)
ListGroups mock implementation of ListGroups from server.AccountManager interface
func (*MockAccountManager) ListNameServerGroups ¶
func (am *MockAccountManager) ListNameServerGroups(accountID string, userID string) ([]*nbdns.NameServerGroup, error)
ListNameServerGroups mocks ListNameServerGroups of the AccountManager interface
func (*MockAccountManager) ListPolicies ¶
func (am *MockAccountManager) ListPolicies(accountID, userID string) ([]*server.Policy, error)
ListPolicies mock implementation of ListPolicies from server.AccountManager interface
func (*MockAccountManager) ListPostureChecks ¶
func (am *MockAccountManager) ListPostureChecks(accountID, userID string) ([]*posture.Checks, error)
ListPostureChecks mocks ListPostureChecks of the AccountManager interface
func (*MockAccountManager) ListRoutes ¶
func (am *MockAccountManager) ListRoutes(accountID, userID string) ([]*route.Route, error)
ListRoutes mock implementation of ListRoutes from server.AccountManager interface
func (*MockAccountManager) ListSetupKeys ¶
func (am *MockAccountManager) ListSetupKeys(accountID, userID string) ([]*server.SetupKey, error)
ListSetupKeys mocks ListSetupKeys of the AccountManager interface
func (*MockAccountManager) ListUsers ¶
func (am *MockAccountManager) ListUsers(accountID string) ([]*server.User, error)
func (*MockAccountManager) LoginPeer ¶
func (am *MockAccountManager) LoginPeer(login server.PeerLogin) (*nbpeer.Peer, *server.NetworkMap, error)
LoginPeer mocks LoginPeer of the AccountManager interface
func (*MockAccountManager) MarkPATUsed ¶
func (am *MockAccountManager) MarkPATUsed(pat string) error
MarkPATUsed mock implementation of MarkPATUsed from server.AccountManager interface
func (*MockAccountManager) MarkPeerConnected ¶
func (am *MockAccountManager) MarkPeerConnected(peerKey string, connected bool, realIP net.IP, account *server.Account) error
MarkPeerConnected mock implementation of MarkPeerConnected from server.AccountManager interface
func (*MockAccountManager) SaveDNSSettings ¶
func (am *MockAccountManager) SaveDNSSettings(accountID string, userID string, dnsSettingsToSave *server.DNSSettings) error
SaveDNSSettings mocks SaveDNSSettings of the AccountManager interface
func (*MockAccountManager) SaveGroup ¶
func (am *MockAccountManager) SaveGroup(accountID, userID string, group *group.Group) error
SaveGroup mock implementation of SaveGroup from server.AccountManager interface
func (*MockAccountManager) SaveNameServerGroup ¶
func (am *MockAccountManager) SaveNameServerGroup(accountID, userID string, nsGroupToSave *nbdns.NameServerGroup) error
SaveNameServerGroup mocks SaveNameServerGroup of the AccountManager interface
func (*MockAccountManager) SaveOrAddUser ¶
func (am *MockAccountManager) SaveOrAddUser(accountID, userID string, user *server.User, addIfNotExists bool) (*server.UserInfo, error)
SaveOrAddUser mocks SaveOrAddUser of the AccountManager interface
func (*MockAccountManager) SavePolicy ¶
func (am *MockAccountManager) SavePolicy(accountID, userID string, policy *server.Policy) error
SavePolicy mock implementation of SavePolicy from server.AccountManager interface
func (*MockAccountManager) SavePostureChecks ¶
func (am *MockAccountManager) SavePostureChecks(accountID, userID string, postureChecks *posture.Checks) error
SavePostureChecks mocks SavePostureChecks of the AccountManager interface
func (*MockAccountManager) SaveRoute ¶
SaveRoute mock implementation of SaveRoute from server.AccountManager interface
func (*MockAccountManager) SaveSetupKey ¶
func (am *MockAccountManager) SaveSetupKey(accountID string, key *server.SetupKey, userID string) (*server.SetupKey, error)
SaveSetupKey mocks SaveSetupKey of the AccountManager interface
func (*MockAccountManager) SaveUser ¶
func (am *MockAccountManager) SaveUser(accountID, userID string, user *server.User) (*server.UserInfo, error)
SaveUser mocks SaveUser of the AccountManager interface
func (*MockAccountManager) StoreEvent ¶
func (am *MockAccountManager) StoreEvent(initiatorID, targetID, accountID string, activityID activity.ActivityDescriber, meta map[string]any)
StoreEvent mocks StoreEvent of the AccountManager interface
func (*MockAccountManager) SyncAndMarkPeer ¶
func (am *MockAccountManager) SyncAndMarkPeer(peerPubKey string, realIP net.IP) (*nbpeer.Peer, *server.NetworkMap, error)
func (*MockAccountManager) SyncPeer ¶
func (am *MockAccountManager) SyncPeer(sync server.PeerSync, account *server.Account) (*nbpeer.Peer, *server.NetworkMap, error)
SyncPeer mocks SyncPeer of the AccountManager interface
func (*MockAccountManager) UpdateAccountSettings ¶
func (am *MockAccountManager) UpdateAccountSettings(accountID, userID string, newSettings *server.Settings) (*server.Account, error)
UpdateAccountSettings mocks UpdateAccountSettings of the AccountManager interface
func (*MockAccountManager) UpdateIntegratedValidatorGroups ¶
func (am *MockAccountManager) UpdateIntegratedValidatorGroups(accountID string, userID string, groups []string) error
UpdateIntegratedValidatorGroups mocks UpdateIntegratedApprovalGroups of the AccountManager interface
func (*MockAccountManager) UpdatePeer ¶
func (am *MockAccountManager) UpdatePeer(accountID, userID string, peer *nbpeer.Peer) (*nbpeer.Peer, error)
UpdatePeer mocks UpdatePeerFunc function of the account manager
func (*MockAccountManager) UpdatePeerMeta ¶
func (am *MockAccountManager) UpdatePeerMeta(peerID string, meta nbpeer.PeerSystemMeta) error
UpdatePeerMeta mock implementation of UpdatePeerMeta from server.AccountManager interface
func (*MockAccountManager) UpdatePeerSSHKey ¶
func (am *MockAccountManager) UpdatePeerSSHKey(peerID string, sshKey string) error
UpdatePeerSSHKey mocks UpdatePeerSSHKey function of the account manager