summaryrefslogtreecommitdiffstats
path: root/store/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/store.go')
-rw-r--r--store/store.go19
1 files changed, 17 insertions, 2 deletions
diff --git a/store/store.go b/store/store.go
index 959e93fa4..0218bc757 100644
--- a/store/store.go
+++ b/store/store.go
@@ -34,6 +34,7 @@ type Store interface {
User() UserStore
Audit() AuditStore
Session() SessionStore
+ OAuth() OAuthStore
Close()
}
@@ -104,9 +105,9 @@ type UserStore interface {
type SessionStore interface {
Save(session *model.Session) StoreChannel
- Get(id string) StoreChannel
+ Get(sessionIdOrToken string) StoreChannel
GetSessions(userId string) StoreChannel
- Remove(sessionIdOrAlt string) StoreChannel
+ Remove(sessionIdOrToken string) StoreChannel
UpdateLastActivityAt(sessionId string, time int64) StoreChannel
UpdateRoles(userId string, roles string) StoreChannel
}
@@ -115,3 +116,17 @@ type AuditStore interface {
Save(audit *model.Audit) StoreChannel
Get(user_id string, limit int) StoreChannel
}
+
+type OAuthStore interface {
+ SaveApp(app *model.OAuthApp) StoreChannel
+ UpdateApp(app *model.OAuthApp) StoreChannel
+ GetApp(id string) StoreChannel
+ GetAppByUser(userId string) StoreChannel
+ SaveAuthData(authData *model.AuthData) StoreChannel
+ GetAuthData(code string) StoreChannel
+ RemoveAuthData(code string) StoreChannel
+ SaveAccessData(accessData *model.AccessData) StoreChannel
+ GetAccessData(token string) StoreChannel
+ GetAccessDataByAuthCode(authCode string) StoreChannel
+ RemoveAccessData(token string) StoreChannel
+}