From da66599fa39ddbff96b0844fabac161e130a2bc4 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 1 Oct 2015 10:56:07 -0400 Subject: Added Preferences table to store user preferences --- store/store.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'store/store.go') diff --git a/store/store.go b/store/store.go index e539bc98a..8a8faae85 100644 --- a/store/store.go +++ b/store/store.go @@ -37,6 +37,7 @@ type Store interface { OAuth() OAuthStore System() SystemStore Webhook() WebhookStore + Preference() PreferenceStore Close() } @@ -149,3 +150,9 @@ type WebhookStore interface { GetIncomingByUser(userId string) StoreChannel DeleteIncoming(webhookId string, time int64) StoreChannel } + +type PreferenceStore interface { + Save(preference *model.Preference) StoreChannel + Update(preference *model.Preference) StoreChannel + GetByName(userId string, category string, name string) StoreChannel +} -- cgit v1.2.3-1-g7c22 From a6cd2a79612d6d96e0e929ab769ec5e70cd35f5f Mon Sep 17 00:00:00 2001 From: hmhealey Date: Wed, 7 Oct 2015 10:19:02 -0400 Subject: Moved saving multiple user preferences into a database transaction --- store/store.go | 1 + 1 file changed, 1 insertion(+) (limited to 'store/store.go') diff --git a/store/store.go b/store/store.go index 8a8faae85..df55bc6d8 100644 --- a/store/store.go +++ b/store/store.go @@ -154,5 +154,6 @@ type WebhookStore interface { type PreferenceStore interface { Save(preference *model.Preference) StoreChannel Update(preference *model.Preference) StoreChannel + SaveOrUpdate(preferences ...*model.Preference) StoreChannel GetByName(userId string, category string, name string) StoreChannel } -- cgit v1.2.3-1-g7c22 From 5cecf1afcd1d8e561a5b2d840e5bd1b588a74a27 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 9 Oct 2015 13:47:11 -0400 Subject: Made structural changes to server-side Preference code based on feedback --- store/store.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'store/store.go') diff --git a/store/store.go b/store/store.go index df55bc6d8..9d9fd6489 100644 --- a/store/store.go +++ b/store/store.go @@ -152,8 +152,6 @@ type WebhookStore interface { } type PreferenceStore interface { - Save(preference *model.Preference) StoreChannel - Update(preference *model.Preference) StoreChannel - SaveOrUpdate(preferences ...*model.Preference) StoreChannel + Save(preferences *model.Preferences) StoreChannel GetByName(userId string, category string, name string) StoreChannel } -- cgit v1.2.3-1-g7c22 From 2a39e8dbfab8506b09d0d030f87cac4c079b975a Mon Sep 17 00:00:00 2001 From: hmhealey Date: Tue, 13 Oct 2015 11:52:17 -0400 Subject: Removed Preference.AltId --- store/store.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'store/store.go') diff --git a/store/store.go b/store/store.go index 9d9fd6489..6e1614ccb 100644 --- a/store/store.go +++ b/store/store.go @@ -153,5 +153,6 @@ type WebhookStore interface { type PreferenceStore interface { Save(preferences *model.Preferences) StoreChannel - GetByName(userId string, category string, name string) StoreChannel + Get(userId string, category string, name string) StoreChannel + GetCategory(userId string, category string) StoreChannel } -- cgit v1.2.3-1-g7c22