summaryrefslogtreecommitdiffstats
path: root/store/layered_store_supplier.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-06-27 08:02:08 -0700
committerGitHub <noreply@github.com>2017-06-27 08:02:08 -0700
commit9659a6da06852ede9bf6b87c0e39a543e88a5034 (patch)
tree56408b6104465af171a03f6a7eeb0b01099ab5e4 /store/layered_store_supplier.go
parent28bf900205c71259369f9a05b349786a39084f5d (diff)
downloadchat-9659a6da06852ede9bf6b87c0e39a543e88a5034.tar.gz
chat-9659a6da06852ede9bf6b87c0e39a543e88a5034.tar.bz2
chat-9659a6da06852ede9bf6b87c0e39a543e88a5034.zip
Stage 1 of caching layer. Framework (#6693)
Diffstat (limited to 'store/layered_store_supplier.go')
-rw-r--r--store/layered_store_supplier.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/store/layered_store_supplier.go b/store/layered_store_supplier.go
new file mode 100644
index 000000000..7b7da5710
--- /dev/null
+++ b/store/layered_store_supplier.go
@@ -0,0 +1,29 @@
+// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+package store
+
+import "github.com/mattermost/platform/model"
+import "context"
+
+type LayeredStoreSupplierResult struct {
+ Result StoreResult
+ Err *model.AppError
+}
+
+func NewSupplierResult() LayeredStoreSupplierResult {
+ return LayeredStoreSupplierResult{
+ Result: StoreResult{},
+ Err: nil,
+ }
+}
+
+type LayeredStoreSupplier interface {
+ //
+ // Reactions
+ //), hints ...LayeredStoreHint)
+ ReactionSave(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) LayeredStoreSupplierResult
+ ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) LayeredStoreSupplierResult
+ ReactionGetForPost(ctx context.Context, postId string, hints ...LayeredStoreHint) LayeredStoreSupplierResult
+ ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) LayeredStoreSupplierResult
+}