From 001a4448ca5fb0018eeb442915b473b121c04bf3 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 6 Jan 2016 21:09:05 -0600 Subject: PLT-1429 adding sql storage for slash commands --- store/store.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'store/store.go') diff --git a/store/store.go b/store/store.go index 8e03c8ee7..b19bba826 100644 --- a/store/store.go +++ b/store/store.go @@ -37,6 +37,7 @@ type Store interface { OAuth() OAuthStore System() SystemStore Webhook() WebhookStore + Command() CommandStore Preference() PreferenceStore MarkSystemRanUnitTests() Close() @@ -182,6 +183,15 @@ type WebhookStore interface { UpdateOutgoing(hook *model.OutgoingWebhook) StoreChannel } +type CommandStore interface { + Save(webhook *model.Command) StoreChannel + Get(id string) StoreChannel + GetByTeam(teamId string) StoreChannel + Delete(commandId string, time int64) StoreChannel + PermanentDeleteByUser(userId string) StoreChannel + Update(hook *model.Command) StoreChannel +} + type PreferenceStore interface { Save(preferences *model.Preferences) StoreChannel Get(userId string, category string, name string) StoreChannel -- cgit v1.2.3-1-g7c22 From 2fd597043b45a75495164915ba6c41d5ab18c5ae Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 11 Jan 2016 10:04:01 -0600 Subject: Chaning webhooks to be team wide --- store/store.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'store/store.go') diff --git a/store/store.go b/store/store.go index b19bba826..9d2d86b40 100644 --- a/store/store.go +++ b/store/store.go @@ -169,13 +169,12 @@ type SystemStore interface { type WebhookStore interface { SaveIncoming(webhook *model.IncomingWebhook) StoreChannel GetIncoming(id string) StoreChannel - GetIncomingByUser(userId string) StoreChannel + GetIncomingByTeam(teamId string) StoreChannel GetIncomingByChannel(channelId string) StoreChannel DeleteIncoming(webhookId string, time int64) StoreChannel PermanentDeleteIncomingByUser(userId string) StoreChannel SaveOutgoing(webhook *model.OutgoingWebhook) StoreChannel GetOutgoing(id string) StoreChannel - GetOutgoingByCreator(userId string) StoreChannel GetOutgoingByChannel(channelId string) StoreChannel GetOutgoingByTeam(teamId string) StoreChannel DeleteOutgoing(webhookId string, time int64) StoreChannel -- cgit v1.2.3-1-g7c22