summaryrefslogtreecommitdiffstats
path: root/store/layered_store_supplier.go
blob: 7b7da5710f00a4baf803cab322784bb10de5a00b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
}