Documentation
¶
Index ¶
- type MockManager
- func (_m *MockManager) AdminResetPassword(ctx context.Context, id uint32, newPassword string) error
- func (_m *MockManager) AdminRevokeAPIKey(ctx context.Context, userID uint32, keyID uint32) error
- func (_m *MockManager) AdminRevokeSession(ctx context.Context, userID uint32, sessionID uint32) error
- func (_m *MockManager) AdminUnlock(ctx context.Context, id uint32) error
- func (_m *MockManager) BootstrapSeedAdmin(ctx context.Context) error
- func (_m *MockManager) ChangePassword(ctx context.Context, userID uint32, current string, newPassword string, ...) error
- func (_m *MockManager) CreateAPIKey(ctx context.Context, userID uint32, name string) (string, *ent.ApiKey, error)
- func (_m *MockManager) CreateInvite(ctx context.Context, createdByID uint32, email string, role string, ...) (string, *ent.Invite, error)
- func (_m *MockManager) CreateUserDirect(ctx context.Context, email string, password string, role string, ...) (*ent.User, error)
- func (_m *MockManager) DeleteUser(ctx context.Context, id uint32, requesterID uint32) error
- func (_m *MockManager) EXPECT() *MockManager_Expecter
- func (_m *MockManager) GetUserByID(ctx context.Context, id uint32) (*ent.User, error)
- func (_m *MockManager) GetUserDetail(ctx context.Context, id uint32) (*ent.User, []*ent.ApiKey, []*ent.Session, error)
- func (_m *MockManager) ListAPIKeys(ctx context.Context, userID uint32) ([]*ent.ApiKey, error)
- func (_m *MockManager) ListInvites(ctx context.Context) ([]*ent.Invite, error)
- func (_m *MockManager) ListUserSessions(ctx context.Context, userID uint32) ([]*ent.Session, error)
- func (_m *MockManager) ListUsers(ctx context.Context, f auth.UserFilter) ([]*ent.User, int, error)
- func (_m *MockManager) Login(ctx context.Context, email string, password string, meta auth.SessionMeta) (string, error)
- func (_m *MockManager) LoginOIDC(ctx context.Context, provider string, subject string, email string, ...) (*ent.User, string, error)
- func (_m *MockManager) LookupInviteForPrefill(ctx context.Context, rawToken string) (*ent.Invite, error)
- func (_m *MockManager) PurgeExpiredSessions(ctx context.Context, before time.Time) (int, error)
- func (_m *MockManager) RegisterOpen(ctx context.Context, email string, password string, displayName string, ...) (*ent.User, string, error)
- func (_m *MockManager) RegisterWithInvite(ctx context.Context, rawToken string, email string, password string, ...) (*ent.User, string, error)
- func (_m *MockManager) RevokeAPIKeyByID(ctx context.Context, userID uint32, keyID uint32) error
- func (_m *MockManager) RevokeInvite(ctx context.Context, id uint32) error
- func (_m *MockManager) RevokeSession(ctx context.Context, jti string) error
- func (_m *MockManager) RevokeSessionByID(ctx context.Context, userID uint32, sessionID uint32) error
- func (_m *MockManager) RotateJWTSecret(ctx context.Context, callerID uint32) (string, error)
- func (_m *MockManager) Shutdown(ctx context.Context) error
- func (_m *MockManager) TouchSessionAsync(jti string)
- func (_m *MockManager) Unlock(ctx context.Context, email string, mode auth.UnlockMode) error
- func (_m *MockManager) UpdateProfile(ctx context.Context, userID uint32, displayName string) (*ent.User, error)
- func (_m *MockManager) UpdateUser(ctx context.Context, id uint32, p auth.UserPatch) error
- func (_m *MockManager) ValidateAPIKey(ctx context.Context, key string) (*ent.User, error)
- func (_m *MockManager) ValidateSession(ctx context.Context, jti string) error
- func (_m *MockManager) ValidateToken(token string) (*auth.Claims, error)
- type MockManager_AdminResetPassword_Call
- func (_c *MockManager_AdminResetPassword_Call) Return(_a0 error) *MockManager_AdminResetPassword_Call
- func (_c *MockManager_AdminResetPassword_Call) Run(run func(ctx context.Context, id uint32, newPassword string)) *MockManager_AdminResetPassword_Call
- func (_c *MockManager_AdminResetPassword_Call) RunAndReturn(run func(context.Context, uint32, string) error) *MockManager_AdminResetPassword_Call
- type MockManager_AdminRevokeAPIKey_Call
- func (_c *MockManager_AdminRevokeAPIKey_Call) Return(_a0 error) *MockManager_AdminRevokeAPIKey_Call
- func (_c *MockManager_AdminRevokeAPIKey_Call) Run(run func(ctx context.Context, userID uint32, keyID uint32)) *MockManager_AdminRevokeAPIKey_Call
- func (_c *MockManager_AdminRevokeAPIKey_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_AdminRevokeAPIKey_Call
- type MockManager_AdminRevokeSession_Call
- func (_c *MockManager_AdminRevokeSession_Call) Return(_a0 error) *MockManager_AdminRevokeSession_Call
- func (_c *MockManager_AdminRevokeSession_Call) Run(run func(ctx context.Context, userID uint32, sessionID uint32)) *MockManager_AdminRevokeSession_Call
- func (_c *MockManager_AdminRevokeSession_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_AdminRevokeSession_Call
- type MockManager_AdminUnlock_Call
- func (_c *MockManager_AdminUnlock_Call) Return(_a0 error) *MockManager_AdminUnlock_Call
- func (_c *MockManager_AdminUnlock_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_AdminUnlock_Call
- func (_c *MockManager_AdminUnlock_Call) RunAndReturn(run func(context.Context, uint32) error) *MockManager_AdminUnlock_Call
- type MockManager_BootstrapSeedAdmin_Call
- func (_c *MockManager_BootstrapSeedAdmin_Call) Return(_a0 error) *MockManager_BootstrapSeedAdmin_Call
- func (_c *MockManager_BootstrapSeedAdmin_Call) Run(run func(ctx context.Context)) *MockManager_BootstrapSeedAdmin_Call
- func (_c *MockManager_BootstrapSeedAdmin_Call) RunAndReturn(run func(context.Context) error) *MockManager_BootstrapSeedAdmin_Call
- type MockManager_ChangePassword_Call
- func (_c *MockManager_ChangePassword_Call) Return(_a0 error) *MockManager_ChangePassword_Call
- func (_c *MockManager_ChangePassword_Call) Run(...) *MockManager_ChangePassword_Call
- func (_c *MockManager_ChangePassword_Call) RunAndReturn(run func(context.Context, uint32, string, string, string) error) *MockManager_ChangePassword_Call
- type MockManager_CreateAPIKey_Call
- func (_c *MockManager_CreateAPIKey_Call) Return(_a0 string, _a1 *ent.ApiKey, _a2 error) *MockManager_CreateAPIKey_Call
- func (_c *MockManager_CreateAPIKey_Call) Run(run func(ctx context.Context, userID uint32, name string)) *MockManager_CreateAPIKey_Call
- func (_c *MockManager_CreateAPIKey_Call) RunAndReturn(run func(context.Context, uint32, string) (string, *ent.ApiKey, error)) *MockManager_CreateAPIKey_Call
- type MockManager_CreateInvite_Call
- type MockManager_CreateUserDirect_Call
- func (_c *MockManager_CreateUserDirect_Call) Return(_a0 *ent.User, _a1 error) *MockManager_CreateUserDirect_Call
- func (_c *MockManager_CreateUserDirect_Call) Run(run func(ctx context.Context, email string, password string, role string, ...)) *MockManager_CreateUserDirect_Call
- func (_c *MockManager_CreateUserDirect_Call) RunAndReturn(run func(context.Context, string, string, string, string) (*ent.User, error)) *MockManager_CreateUserDirect_Call
- type MockManager_DeleteUser_Call
- func (_c *MockManager_DeleteUser_Call) Return(_a0 error) *MockManager_DeleteUser_Call
- func (_c *MockManager_DeleteUser_Call) Run(run func(ctx context.Context, id uint32, requesterID uint32)) *MockManager_DeleteUser_Call
- func (_c *MockManager_DeleteUser_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_DeleteUser_Call
- type MockManager_Expecter
- func (_e *MockManager_Expecter) AdminResetPassword(ctx interface{}, id interface{}, newPassword interface{}) *MockManager_AdminResetPassword_Call
- func (_e *MockManager_Expecter) AdminRevokeAPIKey(ctx interface{}, userID interface{}, keyID interface{}) *MockManager_AdminRevokeAPIKey_Call
- func (_e *MockManager_Expecter) AdminRevokeSession(ctx interface{}, userID interface{}, sessionID interface{}) *MockManager_AdminRevokeSession_Call
- func (_e *MockManager_Expecter) AdminUnlock(ctx interface{}, id interface{}) *MockManager_AdminUnlock_Call
- func (_e *MockManager_Expecter) BootstrapSeedAdmin(ctx interface{}) *MockManager_BootstrapSeedAdmin_Call
- func (_e *MockManager_Expecter) ChangePassword(ctx interface{}, userID interface{}, current interface{}, ...) *MockManager_ChangePassword_Call
- func (_e *MockManager_Expecter) CreateAPIKey(ctx interface{}, userID interface{}, name interface{}) *MockManager_CreateAPIKey_Call
- func (_e *MockManager_Expecter) CreateInvite(ctx interface{}, createdByID interface{}, email interface{}, role interface{}, ...) *MockManager_CreateInvite_Call
- func (_e *MockManager_Expecter) CreateUserDirect(ctx interface{}, email interface{}, password interface{}, role interface{}, ...) *MockManager_CreateUserDirect_Call
- func (_e *MockManager_Expecter) DeleteUser(ctx interface{}, id interface{}, requesterID interface{}) *MockManager_DeleteUser_Call
- func (_e *MockManager_Expecter) GetUserByID(ctx interface{}, id interface{}) *MockManager_GetUserByID_Call
- func (_e *MockManager_Expecter) GetUserDetail(ctx interface{}, id interface{}) *MockManager_GetUserDetail_Call
- func (_e *MockManager_Expecter) ListAPIKeys(ctx interface{}, userID interface{}) *MockManager_ListAPIKeys_Call
- func (_e *MockManager_Expecter) ListInvites(ctx interface{}) *MockManager_ListInvites_Call
- func (_e *MockManager_Expecter) ListUserSessions(ctx interface{}, userID interface{}) *MockManager_ListUserSessions_Call
- func (_e *MockManager_Expecter) ListUsers(ctx interface{}, f interface{}) *MockManager_ListUsers_Call
- func (_e *MockManager_Expecter) Login(ctx interface{}, email interface{}, password interface{}, meta interface{}) *MockManager_Login_Call
- func (_e *MockManager_Expecter) LoginOIDC(ctx interface{}, provider interface{}, subject interface{}, email interface{}, ...) *MockManager_LoginOIDC_Call
- func (_e *MockManager_Expecter) LookupInviteForPrefill(ctx interface{}, rawToken interface{}) *MockManager_LookupInviteForPrefill_Call
- func (_e *MockManager_Expecter) PurgeExpiredSessions(ctx interface{}, before interface{}) *MockManager_PurgeExpiredSessions_Call
- func (_e *MockManager_Expecter) RegisterOpen(ctx interface{}, email interface{}, password interface{}, ...) *MockManager_RegisterOpen_Call
- func (_e *MockManager_Expecter) RegisterWithInvite(ctx interface{}, rawToken interface{}, email interface{}, password interface{}, ...) *MockManager_RegisterWithInvite_Call
- func (_e *MockManager_Expecter) RevokeAPIKeyByID(ctx interface{}, userID interface{}, keyID interface{}) *MockManager_RevokeAPIKeyByID_Call
- func (_e *MockManager_Expecter) RevokeInvite(ctx interface{}, id interface{}) *MockManager_RevokeInvite_Call
- func (_e *MockManager_Expecter) RevokeSession(ctx interface{}, jti interface{}) *MockManager_RevokeSession_Call
- func (_e *MockManager_Expecter) RevokeSessionByID(ctx interface{}, userID interface{}, sessionID interface{}) *MockManager_RevokeSessionByID_Call
- func (_e *MockManager_Expecter) RotateJWTSecret(ctx interface{}, callerID interface{}) *MockManager_RotateJWTSecret_Call
- func (_e *MockManager_Expecter) Shutdown(ctx interface{}) *MockManager_Shutdown_Call
- func (_e *MockManager_Expecter) TouchSessionAsync(jti interface{}) *MockManager_TouchSessionAsync_Call
- func (_e *MockManager_Expecter) Unlock(ctx interface{}, email interface{}, mode interface{}) *MockManager_Unlock_Call
- func (_e *MockManager_Expecter) UpdateProfile(ctx interface{}, userID interface{}, displayName interface{}) *MockManager_UpdateProfile_Call
- func (_e *MockManager_Expecter) UpdateUser(ctx interface{}, id interface{}, p interface{}) *MockManager_UpdateUser_Call
- func (_e *MockManager_Expecter) ValidateAPIKey(ctx interface{}, key interface{}) *MockManager_ValidateAPIKey_Call
- func (_e *MockManager_Expecter) ValidateSession(ctx interface{}, jti interface{}) *MockManager_ValidateSession_Call
- func (_e *MockManager_Expecter) ValidateToken(token interface{}) *MockManager_ValidateToken_Call
- type MockManager_GetUserByID_Call
- func (_c *MockManager_GetUserByID_Call) Return(_a0 *ent.User, _a1 error) *MockManager_GetUserByID_Call
- func (_c *MockManager_GetUserByID_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_GetUserByID_Call
- func (_c *MockManager_GetUserByID_Call) RunAndReturn(run func(context.Context, uint32) (*ent.User, error)) *MockManager_GetUserByID_Call
- type MockManager_GetUserDetail_Call
- func (_c *MockManager_GetUserDetail_Call) Return(_a0 *ent.User, _a1 []*ent.ApiKey, _a2 []*ent.Session, _a3 error) *MockManager_GetUserDetail_Call
- func (_c *MockManager_GetUserDetail_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_GetUserDetail_Call
- func (_c *MockManager_GetUserDetail_Call) RunAndReturn(...) *MockManager_GetUserDetail_Call
- type MockManager_ListAPIKeys_Call
- func (_c *MockManager_ListAPIKeys_Call) Return(_a0 []*ent.ApiKey, _a1 error) *MockManager_ListAPIKeys_Call
- func (_c *MockManager_ListAPIKeys_Call) Run(run func(ctx context.Context, userID uint32)) *MockManager_ListAPIKeys_Call
- func (_c *MockManager_ListAPIKeys_Call) RunAndReturn(run func(context.Context, uint32) ([]*ent.ApiKey, error)) *MockManager_ListAPIKeys_Call
- type MockManager_ListInvites_Call
- func (_c *MockManager_ListInvites_Call) Return(_a0 []*ent.Invite, _a1 error) *MockManager_ListInvites_Call
- func (_c *MockManager_ListInvites_Call) Run(run func(ctx context.Context)) *MockManager_ListInvites_Call
- func (_c *MockManager_ListInvites_Call) RunAndReturn(run func(context.Context) ([]*ent.Invite, error)) *MockManager_ListInvites_Call
- type MockManager_ListUserSessions_Call
- func (_c *MockManager_ListUserSessions_Call) Return(_a0 []*ent.Session, _a1 error) *MockManager_ListUserSessions_Call
- func (_c *MockManager_ListUserSessions_Call) Run(run func(ctx context.Context, userID uint32)) *MockManager_ListUserSessions_Call
- func (_c *MockManager_ListUserSessions_Call) RunAndReturn(run func(context.Context, uint32) ([]*ent.Session, error)) *MockManager_ListUserSessions_Call
- type MockManager_ListUsers_Call
- func (_c *MockManager_ListUsers_Call) Return(_a0 []*ent.User, _a1 int, _a2 error) *MockManager_ListUsers_Call
- func (_c *MockManager_ListUsers_Call) Run(run func(ctx context.Context, f auth.UserFilter)) *MockManager_ListUsers_Call
- func (_c *MockManager_ListUsers_Call) RunAndReturn(run func(context.Context, auth.UserFilter) ([]*ent.User, int, error)) *MockManager_ListUsers_Call
- type MockManager_LoginOIDC_Call
- type MockManager_Login_Call
- func (_c *MockManager_Login_Call) Return(_a0 string, _a1 error) *MockManager_Login_Call
- func (_c *MockManager_Login_Call) Run(...) *MockManager_Login_Call
- func (_c *MockManager_Login_Call) RunAndReturn(run func(context.Context, string, string, auth.SessionMeta) (string, error)) *MockManager_Login_Call
- type MockManager_LookupInviteForPrefill_Call
- func (_c *MockManager_LookupInviteForPrefill_Call) Return(_a0 *ent.Invite, _a1 error) *MockManager_LookupInviteForPrefill_Call
- func (_c *MockManager_LookupInviteForPrefill_Call) Run(run func(ctx context.Context, rawToken string)) *MockManager_LookupInviteForPrefill_Call
- func (_c *MockManager_LookupInviteForPrefill_Call) RunAndReturn(run func(context.Context, string) (*ent.Invite, error)) *MockManager_LookupInviteForPrefill_Call
- type MockManager_PurgeExpiredSessions_Call
- func (_c *MockManager_PurgeExpiredSessions_Call) Return(_a0 int, _a1 error) *MockManager_PurgeExpiredSessions_Call
- func (_c *MockManager_PurgeExpiredSessions_Call) Run(run func(ctx context.Context, before time.Time)) *MockManager_PurgeExpiredSessions_Call
- func (_c *MockManager_PurgeExpiredSessions_Call) RunAndReturn(run func(context.Context, time.Time) (int, error)) *MockManager_PurgeExpiredSessions_Call
- type MockManager_RegisterOpen_Call
- type MockManager_RegisterWithInvite_Call
- func (_c *MockManager_RegisterWithInvite_Call) Return(_a0 *ent.User, _a1 string, _a2 error) *MockManager_RegisterWithInvite_Call
- func (_c *MockManager_RegisterWithInvite_Call) Run(...) *MockManager_RegisterWithInvite_Call
- func (_c *MockManager_RegisterWithInvite_Call) RunAndReturn(...) *MockManager_RegisterWithInvite_Call
- type MockManager_RevokeAPIKeyByID_Call
- func (_c *MockManager_RevokeAPIKeyByID_Call) Return(_a0 error) *MockManager_RevokeAPIKeyByID_Call
- func (_c *MockManager_RevokeAPIKeyByID_Call) Run(run func(ctx context.Context, userID uint32, keyID uint32)) *MockManager_RevokeAPIKeyByID_Call
- func (_c *MockManager_RevokeAPIKeyByID_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_RevokeAPIKeyByID_Call
- type MockManager_RevokeInvite_Call
- func (_c *MockManager_RevokeInvite_Call) Return(_a0 error) *MockManager_RevokeInvite_Call
- func (_c *MockManager_RevokeInvite_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_RevokeInvite_Call
- func (_c *MockManager_RevokeInvite_Call) RunAndReturn(run func(context.Context, uint32) error) *MockManager_RevokeInvite_Call
- type MockManager_RevokeSessionByID_Call
- func (_c *MockManager_RevokeSessionByID_Call) Return(_a0 error) *MockManager_RevokeSessionByID_Call
- func (_c *MockManager_RevokeSessionByID_Call) Run(run func(ctx context.Context, userID uint32, sessionID uint32)) *MockManager_RevokeSessionByID_Call
- func (_c *MockManager_RevokeSessionByID_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_RevokeSessionByID_Call
- type MockManager_RevokeSession_Call
- func (_c *MockManager_RevokeSession_Call) Return(_a0 error) *MockManager_RevokeSession_Call
- func (_c *MockManager_RevokeSession_Call) Run(run func(ctx context.Context, jti string)) *MockManager_RevokeSession_Call
- func (_c *MockManager_RevokeSession_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_RevokeSession_Call
- type MockManager_RotateJWTSecret_Call
- func (_c *MockManager_RotateJWTSecret_Call) Return(_a0 string, _a1 error) *MockManager_RotateJWTSecret_Call
- func (_c *MockManager_RotateJWTSecret_Call) Run(run func(ctx context.Context, callerID uint32)) *MockManager_RotateJWTSecret_Call
- func (_c *MockManager_RotateJWTSecret_Call) RunAndReturn(run func(context.Context, uint32) (string, error)) *MockManager_RotateJWTSecret_Call
- type MockManager_Shutdown_Call
- type MockManager_TouchSessionAsync_Call
- func (_c *MockManager_TouchSessionAsync_Call) Return() *MockManager_TouchSessionAsync_Call
- func (_c *MockManager_TouchSessionAsync_Call) Run(run func(jti string)) *MockManager_TouchSessionAsync_Call
- func (_c *MockManager_TouchSessionAsync_Call) RunAndReturn(run func(string)) *MockManager_TouchSessionAsync_Call
- type MockManager_Unlock_Call
- func (_c *MockManager_Unlock_Call) Return(_a0 error) *MockManager_Unlock_Call
- func (_c *MockManager_Unlock_Call) Run(run func(ctx context.Context, email string, mode auth.UnlockMode)) *MockManager_Unlock_Call
- func (_c *MockManager_Unlock_Call) RunAndReturn(run func(context.Context, string, auth.UnlockMode) error) *MockManager_Unlock_Call
- type MockManager_UpdateProfile_Call
- func (_c *MockManager_UpdateProfile_Call) Return(_a0 *ent.User, _a1 error) *MockManager_UpdateProfile_Call
- func (_c *MockManager_UpdateProfile_Call) Run(run func(ctx context.Context, userID uint32, displayName string)) *MockManager_UpdateProfile_Call
- func (_c *MockManager_UpdateProfile_Call) RunAndReturn(run func(context.Context, uint32, string) (*ent.User, error)) *MockManager_UpdateProfile_Call
- type MockManager_UpdateUser_Call
- func (_c *MockManager_UpdateUser_Call) Return(_a0 error) *MockManager_UpdateUser_Call
- func (_c *MockManager_UpdateUser_Call) Run(run func(ctx context.Context, id uint32, p auth.UserPatch)) *MockManager_UpdateUser_Call
- func (_c *MockManager_UpdateUser_Call) RunAndReturn(run func(context.Context, uint32, auth.UserPatch) error) *MockManager_UpdateUser_Call
- type MockManager_ValidateAPIKey_Call
- func (_c *MockManager_ValidateAPIKey_Call) Return(_a0 *ent.User, _a1 error) *MockManager_ValidateAPIKey_Call
- func (_c *MockManager_ValidateAPIKey_Call) Run(run func(ctx context.Context, key string)) *MockManager_ValidateAPIKey_Call
- func (_c *MockManager_ValidateAPIKey_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *MockManager_ValidateAPIKey_Call
- type MockManager_ValidateSession_Call
- func (_c *MockManager_ValidateSession_Call) Return(_a0 error) *MockManager_ValidateSession_Call
- func (_c *MockManager_ValidateSession_Call) Run(run func(ctx context.Context, jti string)) *MockManager_ValidateSession_Call
- func (_c *MockManager_ValidateSession_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_ValidateSession_Call
- type MockManager_ValidateToken_Call
- func (_c *MockManager_ValidateToken_Call) Return(_a0 *auth.Claims, _a1 error) *MockManager_ValidateToken_Call
- func (_c *MockManager_ValidateToken_Call) Run(run func(token string)) *MockManager_ValidateToken_Call
- func (_c *MockManager_ValidateToken_Call) RunAndReturn(run func(string) (*auth.Claims, error)) *MockManager_ValidateToken_Call
- type MockSessionPurger
- type MockSessionPurger_Expecter
- type MockSessionPurger_PurgeExpiredSessions_Call
- func (_c *MockSessionPurger_PurgeExpiredSessions_Call) Return(_a0 int, _a1 error) *MockSessionPurger_PurgeExpiredSessions_Call
- func (_c *MockSessionPurger_PurgeExpiredSessions_Call) Run(run func(ctx context.Context, before time.Time)) *MockSessionPurger_PurgeExpiredSessions_Call
- func (_c *MockSessionPurger_PurgeExpiredSessions_Call) RunAndReturn(run func(context.Context, time.Time) (int, error)) *MockSessionPurger_PurgeExpiredSessions_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockManager ¶
MockManager is an autogenerated mock type for the Manager type
func NewMockManager ¶
func NewMockManager(t interface {
mock.TestingT
Cleanup(func())
}) *MockManager
NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockManager) AdminResetPassword ¶
AdminResetPassword provides a mock function with given fields: ctx, id, newPassword
func (*MockManager) AdminRevokeAPIKey ¶
AdminRevokeAPIKey provides a mock function with given fields: ctx, userID, keyID
func (*MockManager) AdminRevokeSession ¶
func (_m *MockManager) AdminRevokeSession(ctx context.Context, userID uint32, sessionID uint32) error
AdminRevokeSession provides a mock function with given fields: ctx, userID, sessionID
func (*MockManager) AdminUnlock ¶
func (_m *MockManager) AdminUnlock(ctx context.Context, id uint32) error
AdminUnlock provides a mock function with given fields: ctx, id
func (*MockManager) BootstrapSeedAdmin ¶
func (_m *MockManager) BootstrapSeedAdmin(ctx context.Context) error
BootstrapSeedAdmin provides a mock function with given fields: ctx
func (*MockManager) ChangePassword ¶
func (_m *MockManager) ChangePassword(ctx context.Context, userID uint32, current string, newPassword string, keepJTI string) error
ChangePassword provides a mock function with given fields: ctx, userID, current, newPassword, keepJTI
func (*MockManager) CreateAPIKey ¶
func (_m *MockManager) CreateAPIKey(ctx context.Context, userID uint32, name string) (string, *ent.ApiKey, error)
CreateAPIKey provides a mock function with given fields: ctx, userID, name
func (*MockManager) CreateInvite ¶
func (_m *MockManager) CreateInvite(ctx context.Context, createdByID uint32, email string, role string, ttl time.Duration) (string, *ent.Invite, error)
CreateInvite provides a mock function with given fields: ctx, createdByID, email, role, ttl
func (*MockManager) CreateUserDirect ¶
func (_m *MockManager) CreateUserDirect(ctx context.Context, email string, password string, role string, displayName string) (*ent.User, error)
CreateUserDirect provides a mock function with given fields: ctx, email, password, role, displayName
func (*MockManager) DeleteUser ¶
DeleteUser provides a mock function with given fields: ctx, id, requesterID
func (*MockManager) EXPECT ¶
func (_m *MockManager) EXPECT() *MockManager_Expecter
func (*MockManager) GetUserByID ¶
GetUserByID provides a mock function with given fields: ctx, id
func (*MockManager) GetUserDetail ¶
func (_m *MockManager) GetUserDetail(ctx context.Context, id uint32) (*ent.User, []*ent.ApiKey, []*ent.Session, error)
GetUserDetail provides a mock function with given fields: ctx, id
func (*MockManager) ListAPIKeys ¶
ListAPIKeys provides a mock function with given fields: ctx, userID
func (*MockManager) ListInvites ¶
ListInvites provides a mock function with given fields: ctx
func (*MockManager) ListUserSessions ¶
ListUserSessions provides a mock function with given fields: ctx, userID
func (*MockManager) ListUsers ¶
func (_m *MockManager) ListUsers(ctx context.Context, f auth.UserFilter) ([]*ent.User, int, error)
ListUsers provides a mock function with given fields: ctx, f
func (*MockManager) Login ¶
func (_m *MockManager) Login(ctx context.Context, email string, password string, meta auth.SessionMeta) (string, error)
Login provides a mock function with given fields: ctx, email, password, meta
func (*MockManager) LoginOIDC ¶
func (_m *MockManager) LoginOIDC(ctx context.Context, provider string, subject string, email string, displayName string, emailVerified bool, claims map[string]any, meta auth.SessionMeta) (*ent.User, string, error)
LoginOIDC provides a mock function with given fields: ctx, provider, subject, email, displayName, emailVerified, claims, meta
func (*MockManager) LookupInviteForPrefill ¶
func (_m *MockManager) LookupInviteForPrefill(ctx context.Context, rawToken string) (*ent.Invite, error)
LookupInviteForPrefill provides a mock function with given fields: ctx, rawToken
func (*MockManager) PurgeExpiredSessions ¶
PurgeExpiredSessions provides a mock function with given fields: ctx, before
func (*MockManager) RegisterOpen ¶
func (_m *MockManager) RegisterOpen(ctx context.Context, email string, password string, displayName string, defaultRole string, meta auth.SessionMeta) (*ent.User, string, error)
RegisterOpen provides a mock function with given fields: ctx, email, password, displayName, defaultRole, meta
func (*MockManager) RegisterWithInvite ¶
func (_m *MockManager) RegisterWithInvite(ctx context.Context, rawToken string, email string, password string, displayName string, meta auth.SessionMeta) (*ent.User, string, error)
RegisterWithInvite provides a mock function with given fields: ctx, rawToken, email, password, displayName, meta
func (*MockManager) RevokeAPIKeyByID ¶
RevokeAPIKeyByID provides a mock function with given fields: ctx, userID, keyID
func (*MockManager) RevokeInvite ¶
func (_m *MockManager) RevokeInvite(ctx context.Context, id uint32) error
RevokeInvite provides a mock function with given fields: ctx, id
func (*MockManager) RevokeSession ¶
func (_m *MockManager) RevokeSession(ctx context.Context, jti string) error
RevokeSession provides a mock function with given fields: ctx, jti
func (*MockManager) RevokeSessionByID ¶
func (_m *MockManager) RevokeSessionByID(ctx context.Context, userID uint32, sessionID uint32) error
RevokeSessionByID provides a mock function with given fields: ctx, userID, sessionID
func (*MockManager) RotateJWTSecret ¶
RotateJWTSecret provides a mock function with given fields: ctx, callerID
func (*MockManager) Shutdown ¶
func (_m *MockManager) Shutdown(ctx context.Context) error
Shutdown provides a mock function with given fields: ctx
func (*MockManager) TouchSessionAsync ¶
func (_m *MockManager) TouchSessionAsync(jti string)
TouchSessionAsync provides a mock function with given fields: jti
func (*MockManager) Unlock ¶
func (_m *MockManager) Unlock(ctx context.Context, email string, mode auth.UnlockMode) error
Unlock provides a mock function with given fields: ctx, email, mode
func (*MockManager) UpdateProfile ¶
func (_m *MockManager) UpdateProfile(ctx context.Context, userID uint32, displayName string) (*ent.User, error)
UpdateProfile provides a mock function with given fields: ctx, userID, displayName
func (*MockManager) UpdateUser ¶
UpdateUser provides a mock function with given fields: ctx, id, p
func (*MockManager) ValidateAPIKey ¶
ValidateAPIKey provides a mock function with given fields: ctx, key
func (*MockManager) ValidateSession ¶
func (_m *MockManager) ValidateSession(ctx context.Context, jti string) error
ValidateSession provides a mock function with given fields: ctx, jti
func (*MockManager) ValidateToken ¶
func (_m *MockManager) ValidateToken(token string) (*auth.Claims, error)
ValidateToken provides a mock function with given fields: token
type MockManager_AdminResetPassword_Call ¶
MockManager_AdminResetPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AdminResetPassword'
func (*MockManager_AdminResetPassword_Call) Return ¶
func (_c *MockManager_AdminResetPassword_Call) Return(_a0 error) *MockManager_AdminResetPassword_Call
func (*MockManager_AdminResetPassword_Call) Run ¶
func (_c *MockManager_AdminResetPassword_Call) Run(run func(ctx context.Context, id uint32, newPassword string)) *MockManager_AdminResetPassword_Call
func (*MockManager_AdminResetPassword_Call) RunAndReturn ¶
func (_c *MockManager_AdminResetPassword_Call) RunAndReturn(run func(context.Context, uint32, string) error) *MockManager_AdminResetPassword_Call
type MockManager_AdminRevokeAPIKey_Call ¶
MockManager_AdminRevokeAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AdminRevokeAPIKey'
func (*MockManager_AdminRevokeAPIKey_Call) Return ¶
func (_c *MockManager_AdminRevokeAPIKey_Call) Return(_a0 error) *MockManager_AdminRevokeAPIKey_Call
func (*MockManager_AdminRevokeAPIKey_Call) Run ¶
func (_c *MockManager_AdminRevokeAPIKey_Call) Run(run func(ctx context.Context, userID uint32, keyID uint32)) *MockManager_AdminRevokeAPIKey_Call
func (*MockManager_AdminRevokeAPIKey_Call) RunAndReturn ¶
func (_c *MockManager_AdminRevokeAPIKey_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_AdminRevokeAPIKey_Call
type MockManager_AdminRevokeSession_Call ¶
MockManager_AdminRevokeSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AdminRevokeSession'
func (*MockManager_AdminRevokeSession_Call) Return ¶
func (_c *MockManager_AdminRevokeSession_Call) Return(_a0 error) *MockManager_AdminRevokeSession_Call
func (*MockManager_AdminRevokeSession_Call) Run ¶
func (_c *MockManager_AdminRevokeSession_Call) Run(run func(ctx context.Context, userID uint32, sessionID uint32)) *MockManager_AdminRevokeSession_Call
func (*MockManager_AdminRevokeSession_Call) RunAndReturn ¶
func (_c *MockManager_AdminRevokeSession_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_AdminRevokeSession_Call
type MockManager_AdminUnlock_Call ¶
MockManager_AdminUnlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AdminUnlock'
func (*MockManager_AdminUnlock_Call) Return ¶
func (_c *MockManager_AdminUnlock_Call) Return(_a0 error) *MockManager_AdminUnlock_Call
func (*MockManager_AdminUnlock_Call) Run ¶
func (_c *MockManager_AdminUnlock_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_AdminUnlock_Call
func (*MockManager_AdminUnlock_Call) RunAndReturn ¶
func (_c *MockManager_AdminUnlock_Call) RunAndReturn(run func(context.Context, uint32) error) *MockManager_AdminUnlock_Call
type MockManager_BootstrapSeedAdmin_Call ¶
MockManager_BootstrapSeedAdmin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BootstrapSeedAdmin'
func (*MockManager_BootstrapSeedAdmin_Call) Return ¶
func (_c *MockManager_BootstrapSeedAdmin_Call) Return(_a0 error) *MockManager_BootstrapSeedAdmin_Call
func (*MockManager_BootstrapSeedAdmin_Call) Run ¶
func (_c *MockManager_BootstrapSeedAdmin_Call) Run(run func(ctx context.Context)) *MockManager_BootstrapSeedAdmin_Call
func (*MockManager_BootstrapSeedAdmin_Call) RunAndReturn ¶
func (_c *MockManager_BootstrapSeedAdmin_Call) RunAndReturn(run func(context.Context) error) *MockManager_BootstrapSeedAdmin_Call
type MockManager_ChangePassword_Call ¶
MockManager_ChangePassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangePassword'
func (*MockManager_ChangePassword_Call) Return ¶
func (_c *MockManager_ChangePassword_Call) Return(_a0 error) *MockManager_ChangePassword_Call
func (*MockManager_ChangePassword_Call) Run ¶
func (_c *MockManager_ChangePassword_Call) Run(run func(ctx context.Context, userID uint32, current string, newPassword string, keepJTI string)) *MockManager_ChangePassword_Call
func (*MockManager_ChangePassword_Call) RunAndReturn ¶
func (_c *MockManager_ChangePassword_Call) RunAndReturn(run func(context.Context, uint32, string, string, string) error) *MockManager_ChangePassword_Call
type MockManager_CreateAPIKey_Call ¶
MockManager_CreateAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAPIKey'
func (*MockManager_CreateAPIKey_Call) Return ¶
func (_c *MockManager_CreateAPIKey_Call) Return(_a0 string, _a1 *ent.ApiKey, _a2 error) *MockManager_CreateAPIKey_Call
func (*MockManager_CreateAPIKey_Call) Run ¶
func (_c *MockManager_CreateAPIKey_Call) Run(run func(ctx context.Context, userID uint32, name string)) *MockManager_CreateAPIKey_Call
func (*MockManager_CreateAPIKey_Call) RunAndReturn ¶
func (_c *MockManager_CreateAPIKey_Call) RunAndReturn(run func(context.Context, uint32, string) (string, *ent.ApiKey, error)) *MockManager_CreateAPIKey_Call
type MockManager_CreateInvite_Call ¶
MockManager_CreateInvite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateInvite'
func (*MockManager_CreateInvite_Call) Return ¶
func (_c *MockManager_CreateInvite_Call) Return(_a0 string, _a1 *ent.Invite, _a2 error) *MockManager_CreateInvite_Call
func (*MockManager_CreateInvite_Call) Run ¶
func (_c *MockManager_CreateInvite_Call) Run(run func(ctx context.Context, createdByID uint32, email string, role string, ttl time.Duration)) *MockManager_CreateInvite_Call
func (*MockManager_CreateInvite_Call) RunAndReturn ¶
type MockManager_CreateUserDirect_Call ¶
MockManager_CreateUserDirect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUserDirect'
func (*MockManager_CreateUserDirect_Call) Return ¶
func (_c *MockManager_CreateUserDirect_Call) Return(_a0 *ent.User, _a1 error) *MockManager_CreateUserDirect_Call
func (*MockManager_CreateUserDirect_Call) Run ¶
func (_c *MockManager_CreateUserDirect_Call) Run(run func(ctx context.Context, email string, password string, role string, displayName string)) *MockManager_CreateUserDirect_Call
func (*MockManager_CreateUserDirect_Call) RunAndReturn ¶
type MockManager_DeleteUser_Call ¶
MockManager_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser'
func (*MockManager_DeleteUser_Call) Return ¶
func (_c *MockManager_DeleteUser_Call) Return(_a0 error) *MockManager_DeleteUser_Call
func (*MockManager_DeleteUser_Call) Run ¶
func (_c *MockManager_DeleteUser_Call) Run(run func(ctx context.Context, id uint32, requesterID uint32)) *MockManager_DeleteUser_Call
func (*MockManager_DeleteUser_Call) RunAndReturn ¶
func (_c *MockManager_DeleteUser_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_DeleteUser_Call
type MockManager_Expecter ¶
type MockManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockManager_Expecter) AdminResetPassword ¶
func (_e *MockManager_Expecter) AdminResetPassword(ctx interface{}, id interface{}, newPassword interface{}) *MockManager_AdminResetPassword_Call
AdminResetPassword is a helper method to define mock.On call
- ctx context.Context
- id uint32
- newPassword string
func (*MockManager_Expecter) AdminRevokeAPIKey ¶
func (_e *MockManager_Expecter) AdminRevokeAPIKey(ctx interface{}, userID interface{}, keyID interface{}) *MockManager_AdminRevokeAPIKey_Call
AdminRevokeAPIKey is a helper method to define mock.On call
- ctx context.Context
- userID uint32
- keyID uint32
func (*MockManager_Expecter) AdminRevokeSession ¶
func (_e *MockManager_Expecter) AdminRevokeSession(ctx interface{}, userID interface{}, sessionID interface{}) *MockManager_AdminRevokeSession_Call
AdminRevokeSession is a helper method to define mock.On call
- ctx context.Context
- userID uint32
- sessionID uint32
func (*MockManager_Expecter) AdminUnlock ¶
func (_e *MockManager_Expecter) AdminUnlock(ctx interface{}, id interface{}) *MockManager_AdminUnlock_Call
AdminUnlock is a helper method to define mock.On call
- ctx context.Context
- id uint32
func (*MockManager_Expecter) BootstrapSeedAdmin ¶
func (_e *MockManager_Expecter) BootstrapSeedAdmin(ctx interface{}) *MockManager_BootstrapSeedAdmin_Call
BootstrapSeedAdmin is a helper method to define mock.On call
- ctx context.Context
func (*MockManager_Expecter) ChangePassword ¶
func (_e *MockManager_Expecter) ChangePassword(ctx interface{}, userID interface{}, current interface{}, newPassword interface{}, keepJTI interface{}) *MockManager_ChangePassword_Call
ChangePassword is a helper method to define mock.On call
- ctx context.Context
- userID uint32
- current string
- newPassword string
- keepJTI string
func (*MockManager_Expecter) CreateAPIKey ¶
func (_e *MockManager_Expecter) CreateAPIKey(ctx interface{}, userID interface{}, name interface{}) *MockManager_CreateAPIKey_Call
CreateAPIKey is a helper method to define mock.On call
- ctx context.Context
- userID uint32
- name string
func (*MockManager_Expecter) CreateInvite ¶
func (_e *MockManager_Expecter) CreateInvite(ctx interface{}, createdByID interface{}, email interface{}, role interface{}, ttl interface{}) *MockManager_CreateInvite_Call
CreateInvite is a helper method to define mock.On call
- ctx context.Context
- createdByID uint32
- email string
- role string
- ttl time.Duration
func (*MockManager_Expecter) CreateUserDirect ¶
func (_e *MockManager_Expecter) CreateUserDirect(ctx interface{}, email interface{}, password interface{}, role interface{}, displayName interface{}) *MockManager_CreateUserDirect_Call
CreateUserDirect is a helper method to define mock.On call
- ctx context.Context
- email string
- password string
- role string
- displayName string
func (*MockManager_Expecter) DeleteUser ¶
func (_e *MockManager_Expecter) DeleteUser(ctx interface{}, id interface{}, requesterID interface{}) *MockManager_DeleteUser_Call
DeleteUser is a helper method to define mock.On call
- ctx context.Context
- id uint32
- requesterID uint32
func (*MockManager_Expecter) GetUserByID ¶
func (_e *MockManager_Expecter) GetUserByID(ctx interface{}, id interface{}) *MockManager_GetUserByID_Call
GetUserByID is a helper method to define mock.On call
- ctx context.Context
- id uint32
func (*MockManager_Expecter) GetUserDetail ¶
func (_e *MockManager_Expecter) GetUserDetail(ctx interface{}, id interface{}) *MockManager_GetUserDetail_Call
GetUserDetail is a helper method to define mock.On call
- ctx context.Context
- id uint32
func (*MockManager_Expecter) ListAPIKeys ¶
func (_e *MockManager_Expecter) ListAPIKeys(ctx interface{}, userID interface{}) *MockManager_ListAPIKeys_Call
ListAPIKeys is a helper method to define mock.On call
- ctx context.Context
- userID uint32
func (*MockManager_Expecter) ListInvites ¶
func (_e *MockManager_Expecter) ListInvites(ctx interface{}) *MockManager_ListInvites_Call
ListInvites is a helper method to define mock.On call
- ctx context.Context
func (*MockManager_Expecter) ListUserSessions ¶
func (_e *MockManager_Expecter) ListUserSessions(ctx interface{}, userID interface{}) *MockManager_ListUserSessions_Call
ListUserSessions is a helper method to define mock.On call
- ctx context.Context
- userID uint32
func (*MockManager_Expecter) ListUsers ¶
func (_e *MockManager_Expecter) ListUsers(ctx interface{}, f interface{}) *MockManager_ListUsers_Call
ListUsers is a helper method to define mock.On call
- ctx context.Context
- f auth.UserFilter
func (*MockManager_Expecter) Login ¶
func (_e *MockManager_Expecter) Login(ctx interface{}, email interface{}, password interface{}, meta interface{}) *MockManager_Login_Call
Login is a helper method to define mock.On call
- ctx context.Context
- email string
- password string
- meta auth.SessionMeta
func (*MockManager_Expecter) LoginOIDC ¶
func (_e *MockManager_Expecter) LoginOIDC(ctx interface{}, provider interface{}, subject interface{}, email interface{}, displayName interface{}, emailVerified interface{}, claims interface{}, meta interface{}) *MockManager_LoginOIDC_Call
LoginOIDC is a helper method to define mock.On call
- ctx context.Context
- provider string
- subject string
- email string
- displayName string
- emailVerified bool
- claims map[string]any
- meta auth.SessionMeta
func (*MockManager_Expecter) LookupInviteForPrefill ¶
func (_e *MockManager_Expecter) LookupInviteForPrefill(ctx interface{}, rawToken interface{}) *MockManager_LookupInviteForPrefill_Call
LookupInviteForPrefill is a helper method to define mock.On call
- ctx context.Context
- rawToken string
func (*MockManager_Expecter) PurgeExpiredSessions ¶
func (_e *MockManager_Expecter) PurgeExpiredSessions(ctx interface{}, before interface{}) *MockManager_PurgeExpiredSessions_Call
PurgeExpiredSessions is a helper method to define mock.On call
- ctx context.Context
- before time.Time
func (*MockManager_Expecter) RegisterOpen ¶
func (_e *MockManager_Expecter) RegisterOpen(ctx interface{}, email interface{}, password interface{}, displayName interface{}, defaultRole interface{}, meta interface{}) *MockManager_RegisterOpen_Call
RegisterOpen is a helper method to define mock.On call
- ctx context.Context
- email string
- password string
- displayName string
- defaultRole string
- meta auth.SessionMeta
func (*MockManager_Expecter) RegisterWithInvite ¶
func (_e *MockManager_Expecter) RegisterWithInvite(ctx interface{}, rawToken interface{}, email interface{}, password interface{}, displayName interface{}, meta interface{}) *MockManager_RegisterWithInvite_Call
RegisterWithInvite is a helper method to define mock.On call
- ctx context.Context
- rawToken string
- email string
- password string
- displayName string
- meta auth.SessionMeta
func (*MockManager_Expecter) RevokeAPIKeyByID ¶
func (_e *MockManager_Expecter) RevokeAPIKeyByID(ctx interface{}, userID interface{}, keyID interface{}) *MockManager_RevokeAPIKeyByID_Call
RevokeAPIKeyByID is a helper method to define mock.On call
- ctx context.Context
- userID uint32
- keyID uint32
func (*MockManager_Expecter) RevokeInvite ¶
func (_e *MockManager_Expecter) RevokeInvite(ctx interface{}, id interface{}) *MockManager_RevokeInvite_Call
RevokeInvite is a helper method to define mock.On call
- ctx context.Context
- id uint32
func (*MockManager_Expecter) RevokeSession ¶
func (_e *MockManager_Expecter) RevokeSession(ctx interface{}, jti interface{}) *MockManager_RevokeSession_Call
RevokeSession is a helper method to define mock.On call
- ctx context.Context
- jti string
func (*MockManager_Expecter) RevokeSessionByID ¶
func (_e *MockManager_Expecter) RevokeSessionByID(ctx interface{}, userID interface{}, sessionID interface{}) *MockManager_RevokeSessionByID_Call
RevokeSessionByID is a helper method to define mock.On call
- ctx context.Context
- userID uint32
- sessionID uint32
func (*MockManager_Expecter) RotateJWTSecret ¶
func (_e *MockManager_Expecter) RotateJWTSecret(ctx interface{}, callerID interface{}) *MockManager_RotateJWTSecret_Call
RotateJWTSecret is a helper method to define mock.On call
- ctx context.Context
- callerID uint32
func (*MockManager_Expecter) Shutdown ¶
func (_e *MockManager_Expecter) Shutdown(ctx interface{}) *MockManager_Shutdown_Call
Shutdown is a helper method to define mock.On call
- ctx context.Context
func (*MockManager_Expecter) TouchSessionAsync ¶
func (_e *MockManager_Expecter) TouchSessionAsync(jti interface{}) *MockManager_TouchSessionAsync_Call
TouchSessionAsync is a helper method to define mock.On call
- jti string
func (*MockManager_Expecter) Unlock ¶
func (_e *MockManager_Expecter) Unlock(ctx interface{}, email interface{}, mode interface{}) *MockManager_Unlock_Call
Unlock is a helper method to define mock.On call
- ctx context.Context
- email string
- mode auth.UnlockMode
func (*MockManager_Expecter) UpdateProfile ¶
func (_e *MockManager_Expecter) UpdateProfile(ctx interface{}, userID interface{}, displayName interface{}) *MockManager_UpdateProfile_Call
UpdateProfile is a helper method to define mock.On call
- ctx context.Context
- userID uint32
- displayName string
func (*MockManager_Expecter) UpdateUser ¶
func (_e *MockManager_Expecter) UpdateUser(ctx interface{}, id interface{}, p interface{}) *MockManager_UpdateUser_Call
UpdateUser is a helper method to define mock.On call
- ctx context.Context
- id uint32
- p auth.UserPatch
func (*MockManager_Expecter) ValidateAPIKey ¶
func (_e *MockManager_Expecter) ValidateAPIKey(ctx interface{}, key interface{}) *MockManager_ValidateAPIKey_Call
ValidateAPIKey is a helper method to define mock.On call
- ctx context.Context
- key string
func (*MockManager_Expecter) ValidateSession ¶
func (_e *MockManager_Expecter) ValidateSession(ctx interface{}, jti interface{}) *MockManager_ValidateSession_Call
ValidateSession is a helper method to define mock.On call
- ctx context.Context
- jti string
func (*MockManager_Expecter) ValidateToken ¶
func (_e *MockManager_Expecter) ValidateToken(token interface{}) *MockManager_ValidateToken_Call
ValidateToken is a helper method to define mock.On call
- token string
type MockManager_GetUserByID_Call ¶
MockManager_GetUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByID'
func (*MockManager_GetUserByID_Call) Return ¶
func (_c *MockManager_GetUserByID_Call) Return(_a0 *ent.User, _a1 error) *MockManager_GetUserByID_Call
func (*MockManager_GetUserByID_Call) Run ¶
func (_c *MockManager_GetUserByID_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_GetUserByID_Call
func (*MockManager_GetUserByID_Call) RunAndReturn ¶
func (_c *MockManager_GetUserByID_Call) RunAndReturn(run func(context.Context, uint32) (*ent.User, error)) *MockManager_GetUserByID_Call
type MockManager_GetUserDetail_Call ¶
MockManager_GetUserDetail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserDetail'
func (*MockManager_GetUserDetail_Call) Return ¶
func (_c *MockManager_GetUserDetail_Call) Return(_a0 *ent.User, _a1 []*ent.ApiKey, _a2 []*ent.Session, _a3 error) *MockManager_GetUserDetail_Call
func (*MockManager_GetUserDetail_Call) Run ¶
func (_c *MockManager_GetUserDetail_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_GetUserDetail_Call
func (*MockManager_GetUserDetail_Call) RunAndReturn ¶
type MockManager_ListAPIKeys_Call ¶
MockManager_ListAPIKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAPIKeys'
func (*MockManager_ListAPIKeys_Call) Return ¶
func (_c *MockManager_ListAPIKeys_Call) Return(_a0 []*ent.ApiKey, _a1 error) *MockManager_ListAPIKeys_Call
func (*MockManager_ListAPIKeys_Call) Run ¶
func (_c *MockManager_ListAPIKeys_Call) Run(run func(ctx context.Context, userID uint32)) *MockManager_ListAPIKeys_Call
func (*MockManager_ListAPIKeys_Call) RunAndReturn ¶
func (_c *MockManager_ListAPIKeys_Call) RunAndReturn(run func(context.Context, uint32) ([]*ent.ApiKey, error)) *MockManager_ListAPIKeys_Call
type MockManager_ListInvites_Call ¶
MockManager_ListInvites_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListInvites'
func (*MockManager_ListInvites_Call) Return ¶
func (_c *MockManager_ListInvites_Call) Return(_a0 []*ent.Invite, _a1 error) *MockManager_ListInvites_Call
func (*MockManager_ListInvites_Call) Run ¶
func (_c *MockManager_ListInvites_Call) Run(run func(ctx context.Context)) *MockManager_ListInvites_Call
func (*MockManager_ListInvites_Call) RunAndReturn ¶
func (_c *MockManager_ListInvites_Call) RunAndReturn(run func(context.Context) ([]*ent.Invite, error)) *MockManager_ListInvites_Call
type MockManager_ListUserSessions_Call ¶
MockManager_ListUserSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUserSessions'
func (*MockManager_ListUserSessions_Call) Return ¶
func (_c *MockManager_ListUserSessions_Call) Return(_a0 []*ent.Session, _a1 error) *MockManager_ListUserSessions_Call
func (*MockManager_ListUserSessions_Call) Run ¶
func (_c *MockManager_ListUserSessions_Call) Run(run func(ctx context.Context, userID uint32)) *MockManager_ListUserSessions_Call
func (*MockManager_ListUserSessions_Call) RunAndReturn ¶
func (_c *MockManager_ListUserSessions_Call) RunAndReturn(run func(context.Context, uint32) ([]*ent.Session, error)) *MockManager_ListUserSessions_Call
type MockManager_ListUsers_Call ¶
MockManager_ListUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUsers'
func (*MockManager_ListUsers_Call) Return ¶
func (_c *MockManager_ListUsers_Call) Return(_a0 []*ent.User, _a1 int, _a2 error) *MockManager_ListUsers_Call
func (*MockManager_ListUsers_Call) Run ¶
func (_c *MockManager_ListUsers_Call) Run(run func(ctx context.Context, f auth.UserFilter)) *MockManager_ListUsers_Call
func (*MockManager_ListUsers_Call) RunAndReturn ¶
func (_c *MockManager_ListUsers_Call) RunAndReturn(run func(context.Context, auth.UserFilter) ([]*ent.User, int, error)) *MockManager_ListUsers_Call
type MockManager_LoginOIDC_Call ¶
MockManager_LoginOIDC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoginOIDC'
func (*MockManager_LoginOIDC_Call) Return ¶
func (_c *MockManager_LoginOIDC_Call) Return(_a0 *ent.User, _a1 string, _a2 error) *MockManager_LoginOIDC_Call
func (*MockManager_LoginOIDC_Call) Run ¶
func (_c *MockManager_LoginOIDC_Call) Run(run func(ctx context.Context, provider string, subject string, email string, displayName string, emailVerified bool, claims map[string]any, meta auth.SessionMeta)) *MockManager_LoginOIDC_Call
func (*MockManager_LoginOIDC_Call) RunAndReturn ¶
type MockManager_Login_Call ¶
MockManager_Login_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Login'
func (*MockManager_Login_Call) Return ¶
func (_c *MockManager_Login_Call) Return(_a0 string, _a1 error) *MockManager_Login_Call
func (*MockManager_Login_Call) Run ¶
func (_c *MockManager_Login_Call) Run(run func(ctx context.Context, email string, password string, meta auth.SessionMeta)) *MockManager_Login_Call
func (*MockManager_Login_Call) RunAndReturn ¶
func (_c *MockManager_Login_Call) RunAndReturn(run func(context.Context, string, string, auth.SessionMeta) (string, error)) *MockManager_Login_Call
type MockManager_LookupInviteForPrefill_Call ¶
MockManager_LookupInviteForPrefill_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LookupInviteForPrefill'
func (*MockManager_LookupInviteForPrefill_Call) Return ¶
func (_c *MockManager_LookupInviteForPrefill_Call) Return(_a0 *ent.Invite, _a1 error) *MockManager_LookupInviteForPrefill_Call
func (*MockManager_LookupInviteForPrefill_Call) Run ¶
func (_c *MockManager_LookupInviteForPrefill_Call) Run(run func(ctx context.Context, rawToken string)) *MockManager_LookupInviteForPrefill_Call
func (*MockManager_LookupInviteForPrefill_Call) RunAndReturn ¶
func (_c *MockManager_LookupInviteForPrefill_Call) RunAndReturn(run func(context.Context, string) (*ent.Invite, error)) *MockManager_LookupInviteForPrefill_Call
type MockManager_PurgeExpiredSessions_Call ¶
MockManager_PurgeExpiredSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeExpiredSessions'
func (*MockManager_PurgeExpiredSessions_Call) Return ¶
func (_c *MockManager_PurgeExpiredSessions_Call) Return(_a0 int, _a1 error) *MockManager_PurgeExpiredSessions_Call
func (*MockManager_PurgeExpiredSessions_Call) Run ¶
func (_c *MockManager_PurgeExpiredSessions_Call) Run(run func(ctx context.Context, before time.Time)) *MockManager_PurgeExpiredSessions_Call
func (*MockManager_PurgeExpiredSessions_Call) RunAndReturn ¶
func (_c *MockManager_PurgeExpiredSessions_Call) RunAndReturn(run func(context.Context, time.Time) (int, error)) *MockManager_PurgeExpiredSessions_Call
type MockManager_RegisterOpen_Call ¶
MockManager_RegisterOpen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterOpen'
func (*MockManager_RegisterOpen_Call) Return ¶
func (_c *MockManager_RegisterOpen_Call) Return(_a0 *ent.User, _a1 string, _a2 error) *MockManager_RegisterOpen_Call
func (*MockManager_RegisterOpen_Call) Run ¶
func (_c *MockManager_RegisterOpen_Call) Run(run func(ctx context.Context, email string, password string, displayName string, defaultRole string, meta auth.SessionMeta)) *MockManager_RegisterOpen_Call
func (*MockManager_RegisterOpen_Call) RunAndReturn ¶
func (_c *MockManager_RegisterOpen_Call) RunAndReturn(run func(context.Context, string, string, string, string, auth.SessionMeta) (*ent.User, string, error)) *MockManager_RegisterOpen_Call
type MockManager_RegisterWithInvite_Call ¶
MockManager_RegisterWithInvite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterWithInvite'
func (*MockManager_RegisterWithInvite_Call) Return ¶
func (_c *MockManager_RegisterWithInvite_Call) Return(_a0 *ent.User, _a1 string, _a2 error) *MockManager_RegisterWithInvite_Call
func (*MockManager_RegisterWithInvite_Call) Run ¶
func (_c *MockManager_RegisterWithInvite_Call) Run(run func(ctx context.Context, rawToken string, email string, password string, displayName string, meta auth.SessionMeta)) *MockManager_RegisterWithInvite_Call
func (*MockManager_RegisterWithInvite_Call) RunAndReturn ¶
func (_c *MockManager_RegisterWithInvite_Call) RunAndReturn(run func(context.Context, string, string, string, string, auth.SessionMeta) (*ent.User, string, error)) *MockManager_RegisterWithInvite_Call
type MockManager_RevokeAPIKeyByID_Call ¶
MockManager_RevokeAPIKeyByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeAPIKeyByID'
func (*MockManager_RevokeAPIKeyByID_Call) Return ¶
func (_c *MockManager_RevokeAPIKeyByID_Call) Return(_a0 error) *MockManager_RevokeAPIKeyByID_Call
func (*MockManager_RevokeAPIKeyByID_Call) Run ¶
func (_c *MockManager_RevokeAPIKeyByID_Call) Run(run func(ctx context.Context, userID uint32, keyID uint32)) *MockManager_RevokeAPIKeyByID_Call
func (*MockManager_RevokeAPIKeyByID_Call) RunAndReturn ¶
func (_c *MockManager_RevokeAPIKeyByID_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_RevokeAPIKeyByID_Call
type MockManager_RevokeInvite_Call ¶
MockManager_RevokeInvite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeInvite'
func (*MockManager_RevokeInvite_Call) Return ¶
func (_c *MockManager_RevokeInvite_Call) Return(_a0 error) *MockManager_RevokeInvite_Call
func (*MockManager_RevokeInvite_Call) Run ¶
func (_c *MockManager_RevokeInvite_Call) Run(run func(ctx context.Context, id uint32)) *MockManager_RevokeInvite_Call
func (*MockManager_RevokeInvite_Call) RunAndReturn ¶
func (_c *MockManager_RevokeInvite_Call) RunAndReturn(run func(context.Context, uint32) error) *MockManager_RevokeInvite_Call
type MockManager_RevokeSessionByID_Call ¶
MockManager_RevokeSessionByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeSessionByID'
func (*MockManager_RevokeSessionByID_Call) Return ¶
func (_c *MockManager_RevokeSessionByID_Call) Return(_a0 error) *MockManager_RevokeSessionByID_Call
func (*MockManager_RevokeSessionByID_Call) Run ¶
func (_c *MockManager_RevokeSessionByID_Call) Run(run func(ctx context.Context, userID uint32, sessionID uint32)) *MockManager_RevokeSessionByID_Call
func (*MockManager_RevokeSessionByID_Call) RunAndReturn ¶
func (_c *MockManager_RevokeSessionByID_Call) RunAndReturn(run func(context.Context, uint32, uint32) error) *MockManager_RevokeSessionByID_Call
type MockManager_RevokeSession_Call ¶
MockManager_RevokeSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeSession'
func (*MockManager_RevokeSession_Call) Return ¶
func (_c *MockManager_RevokeSession_Call) Return(_a0 error) *MockManager_RevokeSession_Call
func (*MockManager_RevokeSession_Call) Run ¶
func (_c *MockManager_RevokeSession_Call) Run(run func(ctx context.Context, jti string)) *MockManager_RevokeSession_Call
func (*MockManager_RevokeSession_Call) RunAndReturn ¶
func (_c *MockManager_RevokeSession_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_RevokeSession_Call
type MockManager_RotateJWTSecret_Call ¶
MockManager_RotateJWTSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RotateJWTSecret'
func (*MockManager_RotateJWTSecret_Call) Return ¶
func (_c *MockManager_RotateJWTSecret_Call) Return(_a0 string, _a1 error) *MockManager_RotateJWTSecret_Call
func (*MockManager_RotateJWTSecret_Call) Run ¶
func (_c *MockManager_RotateJWTSecret_Call) Run(run func(ctx context.Context, callerID uint32)) *MockManager_RotateJWTSecret_Call
func (*MockManager_RotateJWTSecret_Call) RunAndReturn ¶
func (_c *MockManager_RotateJWTSecret_Call) RunAndReturn(run func(context.Context, uint32) (string, error)) *MockManager_RotateJWTSecret_Call
type MockManager_Shutdown_Call ¶
MockManager_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'
func (*MockManager_Shutdown_Call) Return ¶
func (_c *MockManager_Shutdown_Call) Return(_a0 error) *MockManager_Shutdown_Call
func (*MockManager_Shutdown_Call) Run ¶
func (_c *MockManager_Shutdown_Call) Run(run func(ctx context.Context)) *MockManager_Shutdown_Call
func (*MockManager_Shutdown_Call) RunAndReturn ¶
func (_c *MockManager_Shutdown_Call) RunAndReturn(run func(context.Context) error) *MockManager_Shutdown_Call
type MockManager_TouchSessionAsync_Call ¶
MockManager_TouchSessionAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TouchSessionAsync'
func (*MockManager_TouchSessionAsync_Call) Return ¶
func (_c *MockManager_TouchSessionAsync_Call) Return() *MockManager_TouchSessionAsync_Call
func (*MockManager_TouchSessionAsync_Call) Run ¶
func (_c *MockManager_TouchSessionAsync_Call) Run(run func(jti string)) *MockManager_TouchSessionAsync_Call
func (*MockManager_TouchSessionAsync_Call) RunAndReturn ¶
func (_c *MockManager_TouchSessionAsync_Call) RunAndReturn(run func(string)) *MockManager_TouchSessionAsync_Call
type MockManager_Unlock_Call ¶
MockManager_Unlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unlock'
func (*MockManager_Unlock_Call) Return ¶
func (_c *MockManager_Unlock_Call) Return(_a0 error) *MockManager_Unlock_Call
func (*MockManager_Unlock_Call) Run ¶
func (_c *MockManager_Unlock_Call) Run(run func(ctx context.Context, email string, mode auth.UnlockMode)) *MockManager_Unlock_Call
func (*MockManager_Unlock_Call) RunAndReturn ¶
func (_c *MockManager_Unlock_Call) RunAndReturn(run func(context.Context, string, auth.UnlockMode) error) *MockManager_Unlock_Call
type MockManager_UpdateProfile_Call ¶
MockManager_UpdateProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateProfile'
func (*MockManager_UpdateProfile_Call) Return ¶
func (_c *MockManager_UpdateProfile_Call) Return(_a0 *ent.User, _a1 error) *MockManager_UpdateProfile_Call
func (*MockManager_UpdateProfile_Call) Run ¶
func (_c *MockManager_UpdateProfile_Call) Run(run func(ctx context.Context, userID uint32, displayName string)) *MockManager_UpdateProfile_Call
func (*MockManager_UpdateProfile_Call) RunAndReturn ¶
func (_c *MockManager_UpdateProfile_Call) RunAndReturn(run func(context.Context, uint32, string) (*ent.User, error)) *MockManager_UpdateProfile_Call
type MockManager_UpdateUser_Call ¶
MockManager_UpdateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUser'
func (*MockManager_UpdateUser_Call) Return ¶
func (_c *MockManager_UpdateUser_Call) Return(_a0 error) *MockManager_UpdateUser_Call
func (*MockManager_UpdateUser_Call) Run ¶
func (_c *MockManager_UpdateUser_Call) Run(run func(ctx context.Context, id uint32, p auth.UserPatch)) *MockManager_UpdateUser_Call
func (*MockManager_UpdateUser_Call) RunAndReturn ¶
func (_c *MockManager_UpdateUser_Call) RunAndReturn(run func(context.Context, uint32, auth.UserPatch) error) *MockManager_UpdateUser_Call
type MockManager_ValidateAPIKey_Call ¶
MockManager_ValidateAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateAPIKey'
func (*MockManager_ValidateAPIKey_Call) Return ¶
func (_c *MockManager_ValidateAPIKey_Call) Return(_a0 *ent.User, _a1 error) *MockManager_ValidateAPIKey_Call
func (*MockManager_ValidateAPIKey_Call) Run ¶
func (_c *MockManager_ValidateAPIKey_Call) Run(run func(ctx context.Context, key string)) *MockManager_ValidateAPIKey_Call
func (*MockManager_ValidateAPIKey_Call) RunAndReturn ¶
func (_c *MockManager_ValidateAPIKey_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *MockManager_ValidateAPIKey_Call
type MockManager_ValidateSession_Call ¶
MockManager_ValidateSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateSession'
func (*MockManager_ValidateSession_Call) Return ¶
func (_c *MockManager_ValidateSession_Call) Return(_a0 error) *MockManager_ValidateSession_Call
func (*MockManager_ValidateSession_Call) Run ¶
func (_c *MockManager_ValidateSession_Call) Run(run func(ctx context.Context, jti string)) *MockManager_ValidateSession_Call
func (*MockManager_ValidateSession_Call) RunAndReturn ¶
func (_c *MockManager_ValidateSession_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_ValidateSession_Call
type MockManager_ValidateToken_Call ¶
MockManager_ValidateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToken'
func (*MockManager_ValidateToken_Call) Return ¶
func (_c *MockManager_ValidateToken_Call) Return(_a0 *auth.Claims, _a1 error) *MockManager_ValidateToken_Call
func (*MockManager_ValidateToken_Call) Run ¶
func (_c *MockManager_ValidateToken_Call) Run(run func(token string)) *MockManager_ValidateToken_Call
func (*MockManager_ValidateToken_Call) RunAndReturn ¶
func (_c *MockManager_ValidateToken_Call) RunAndReturn(run func(string) (*auth.Claims, error)) *MockManager_ValidateToken_Call
type MockSessionPurger ¶
MockSessionPurger is an autogenerated mock type for the SessionPurger type
func NewMockSessionPurger ¶
func NewMockSessionPurger(t interface {
mock.TestingT
Cleanup(func())
}) *MockSessionPurger
NewMockSessionPurger creates a new instance of MockSessionPurger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockSessionPurger) EXPECT ¶
func (_m *MockSessionPurger) EXPECT() *MockSessionPurger_Expecter
func (*MockSessionPurger) PurgeExpiredSessions ¶
func (_m *MockSessionPurger) PurgeExpiredSessions(ctx context.Context, before time.Time) (int, error)
PurgeExpiredSessions provides a mock function with given fields: ctx, before
type MockSessionPurger_Expecter ¶
type MockSessionPurger_Expecter struct {
// contains filtered or unexported fields
}
func (*MockSessionPurger_Expecter) PurgeExpiredSessions ¶
func (_e *MockSessionPurger_Expecter) PurgeExpiredSessions(ctx interface{}, before interface{}) *MockSessionPurger_PurgeExpiredSessions_Call
PurgeExpiredSessions is a helper method to define mock.On call
- ctx context.Context
- before time.Time
type MockSessionPurger_PurgeExpiredSessions_Call ¶
MockSessionPurger_PurgeExpiredSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeExpiredSessions'
func (*MockSessionPurger_PurgeExpiredSessions_Call) Return ¶
func (_c *MockSessionPurger_PurgeExpiredSessions_Call) Return(_a0 int, _a1 error) *MockSessionPurger_PurgeExpiredSessions_Call
func (*MockSessionPurger_PurgeExpiredSessions_Call) Run ¶
func (_c *MockSessionPurger_PurgeExpiredSessions_Call) Run(run func(ctx context.Context, before time.Time)) *MockSessionPurger_PurgeExpiredSessions_Call
func (*MockSessionPurger_PurgeExpiredSessions_Call) RunAndReturn ¶
func (_c *MockSessionPurger_PurgeExpiredSessions_Call) RunAndReturn(run func(context.Context, time.Time) (int, error)) *MockSessionPurger_PurgeExpiredSessions_Call