diff options
Diffstat (limited to 'store/layered_store_supplier.go')
-rw-r--r-- | store/layered_store_supplier.go | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/store/layered_store_supplier.go b/store/layered_store_supplier.go index 7b7da5710..22c90ab17 100644 --- a/store/layered_store_supplier.go +++ b/store/layered_store_supplier.go @@ -6,24 +6,28 @@ package store import "github.com/mattermost/platform/model" import "context" +type ResultHandler func(*StoreResult) + type LayeredStoreSupplierResult struct { - Result StoreResult - Err *model.AppError + StoreResult } -func NewSupplierResult() LayeredStoreSupplierResult { - return LayeredStoreSupplierResult{ - Result: StoreResult{}, - Err: nil, - } +func NewSupplierResult() *LayeredStoreSupplierResult { + return &LayeredStoreSupplierResult{} } type LayeredStoreSupplier interface { // + // Control + // + SetChainNext(LayeredStoreSupplier) + Next() LayeredStoreSupplier + + // // 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 + 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 } |