github.com/demisto/mattermost-server@v4.9.0-rc3+incompatible/store/layered_store_supplier.go (about)

     1  // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
     2  // See License.txt for license information.
     3  
     4  package store
     5  
     6  import "github.com/mattermost/mattermost-server/model"
     7  import "context"
     8  
     9  type LayeredStoreSupplierResult struct {
    10  	StoreResult
    11  }
    12  
    13  func NewSupplierResult() *LayeredStoreSupplierResult {
    14  	return &LayeredStoreSupplierResult{}
    15  }
    16  
    17  type LayeredStoreSupplier interface {
    18  	//
    19  	// Control
    20  	//
    21  	SetChainNext(LayeredStoreSupplier)
    22  	Next() LayeredStoreSupplier
    23  
    24  	//
    25  	// Reactions
    26  	//), hints ...LayeredStoreHint)
    27  	ReactionSave(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    28  	ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    29  	ReactionGetForPost(ctx context.Context, postId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    30  	ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    31  	ReactionPermanentDeleteBatch(ctx context.Context, endTime int64, limit int64, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    32  
    33  	// Roles
    34  	RoleSave(ctx context.Context, role *model.Role, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    35  	RoleGet(ctx context.Context, roleId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    36  	RoleGetByName(ctx context.Context, name string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    37  	RoleGetByNames(ctx context.Context, names []string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
    38  }