summaryrefslogtreecommitdiffstats
path: root/store/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/store.go')
-rw-r--r--store/store.go34
1 files changed, 27 insertions, 7 deletions
diff --git a/store/store.go b/store/store.go
index 4a4fa1481..f5c440721 100644
--- a/store/store.go
+++ b/store/store.go
@@ -41,8 +41,10 @@ type Store interface {
Command() CommandStore
Preference() PreferenceStore
License() LicenseStore
+ PasswordRecovery() PasswordRecoveryStore
MarkSystemRanUnitTests()
Close()
+ DropAllTables()
}
type TeamStore interface {
@@ -51,12 +53,19 @@ type TeamStore interface {
UpdateDisplayName(name string, teamId string) StoreChannel
Get(id string) StoreChannel
GetByName(name string) StoreChannel
- GetTeamsForEmail(domain string) StoreChannel
GetAll() StoreChannel
GetAllTeamListing() StoreChannel
+ GetTeamsByUserId(userId string) StoreChannel
GetByInviteId(inviteId string) StoreChannel
PermanentDelete(teamId string) StoreChannel
AnalyticsTeamCount() StoreChannel
+ SaveMember(member *model.TeamMember) StoreChannel
+ UpdateMember(member *model.TeamMember) StoreChannel
+ GetMembers(teamId string) StoreChannel
+ GetTeamsForUser(userId string) StoreChannel
+ RemoveMember(teamId string, userId string) StoreChannel
+ RemoveAllMembersByTeam(teamId string) StoreChannel
+ RemoveAllMembersByUser(userId string) StoreChannel
}
type ChannelStore interface {
@@ -82,6 +91,7 @@ type ChannelStore interface {
PermanentDeleteMembersByUser(userId string) StoreChannel
GetExtraMembers(channelId string, limit int) StoreChannel
CheckPermissionsTo(teamId string, channelId string, userId string) StoreChannel
+ CheckPermissionsToNoTeam(channelId string, userId string) StoreChannel
CheckOpenChannelPermissions(teamId string, channelId string) StoreChannel
CheckPermissionsToByName(teamId string, channelName string, userId string) StoreChannel
UpdateLastViewedAt(channelId string, userId string) StoreChannel
@@ -120,12 +130,16 @@ type UserStore interface {
UpdateMfaSecret(userId, secret string) StoreChannel
UpdateMfaActive(userId string, active bool) StoreChannel
Get(id string) StoreChannel
+ GetAll() StoreChannel
GetProfiles(teamId string) StoreChannel
- GetByEmail(teamId string, email string) StoreChannel
- GetByAuth(teamId string, authData string, authService string) StoreChannel
- GetByUsername(teamId string, username string) StoreChannel
+ GetDirectProfiles(userId string) StoreChannel
+ GetProfileByIds(userId []string) StoreChannel
+ GetByEmail(email string) StoreChannel
+ GetByAuth(authData string, authService string) StoreChannel
+ GetByUsername(username string) StoreChannel
VerifyEmail(userId string) StoreChannel
GetEtagForProfiles(teamId string) StoreChannel
+ GetEtagForDirectProfiles(userId string) StoreChannel
UpdateFailedPasswordAttempts(userId string, attempts int) StoreChannel
GetForExport(teamId string) StoreChannel
GetTotalUsersCount() StoreChannel
@@ -133,7 +147,6 @@ type UserStore interface {
GetSystemAdminProfiles() StoreChannel
PermanentDelete(userId string) StoreChannel
AnalyticsUniqueUserCount(teamId string) StoreChannel
-
GetUnreadCount(userId string) StoreChannel
}
@@ -142,12 +155,12 @@ type SessionStore interface {
Get(sessionIdOrToken string) StoreChannel
GetSessions(userId string) StoreChannel
Remove(sessionIdOrToken string) StoreChannel
- RemoveAllSessionsForTeam(teamId string) StoreChannel
+ RemoveAllSessions() StoreChannel
PermanentDeleteSessionsByUser(teamId string) StoreChannel
UpdateLastActivityAt(sessionId string, time int64) StoreChannel
UpdateRoles(userId string, roles string) StoreChannel
UpdateDeviceId(id string, deviceId string) StoreChannel
- AnalyticsSessionCount(teamId string) StoreChannel
+ AnalyticsSessionCount() StoreChannel
}
type AuditStore interface {
@@ -228,3 +241,10 @@ type LicenseStore interface {
Save(license *model.LicenseRecord) StoreChannel
Get(id string) StoreChannel
}
+
+type PasswordRecoveryStore interface {
+ SaveOrUpdate(recovery *model.PasswordRecovery) StoreChannel
+ Delete(userId string) StoreChannel
+ Get(userId string) StoreChannel
+ GetByCode(code string) StoreChannel
+}