2020-10-21 09:56:03 +02:00
|
|
|
//go:generate mockgen -destination=mockstore/mockstore.go -package mockstore . Store
|
2020-10-16 19:20:43 +02:00
|
|
|
package store
|
|
|
|
|
|
|
|
import "github.com/mattermost/mattermost-octo-tasks/server/model"
|
|
|
|
|
2020-10-22 15:22:36 +02:00
|
|
|
// Store represents the abstraction of the data storage.
|
2020-10-16 19:20:43 +02:00
|
|
|
type Store interface {
|
|
|
|
GetBlocksWithParentAndType(parentID string, blockType string) ([]model.Block, error)
|
|
|
|
GetBlocksWithParent(parentID string) ([]model.Block, error)
|
|
|
|
GetBlocksWithType(blockType string) ([]model.Block, error)
|
2020-11-12 19:16:59 +01:00
|
|
|
GetSubTree2(blockID string) ([]model.Block, error)
|
|
|
|
GetSubTree3(blockID string) ([]model.Block, error)
|
2020-10-16 19:20:43 +02:00
|
|
|
GetAllBlocks() ([]model.Block, error)
|
|
|
|
GetParentID(blockID string) (string, error)
|
|
|
|
InsertBlock(block model.Block) error
|
|
|
|
DeleteBlock(blockID string) error
|
2020-10-16 22:26:47 +02:00
|
|
|
Shutdown() error
|
2020-10-19 14:55:20 +02:00
|
|
|
GetSystemSettings() (map[string]string, error)
|
|
|
|
SetSystemSetting(key string, value string) error
|
2020-11-06 16:46:35 +01:00
|
|
|
GetUserById(userID string) (*model.User, error)
|
|
|
|
GetUserByEmail(email string) (*model.User, error)
|
|
|
|
GetUserByUsername(username string) (*model.User, error)
|
|
|
|
CreateUser(user *model.User) error
|
|
|
|
UpdateUser(user *model.User) error
|
2020-10-16 19:20:43 +02:00
|
|
|
}
|