mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* Adding Reaction store cache layer example * Implementing reaction store in new caching system. * Redis for reaction store * Adding redis library * Adding invalidation for DeleteAllWithEmojiName and other minor enhancements
34 lines
1.0 KiB
Go
34 lines
1.0 KiB
Go
// 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 ResultHandler func(*StoreResult)
|
|
|
|
type LayeredStoreSupplierResult struct {
|
|
StoreResult
|
|
}
|
|
|
|
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
|
|
}
|