1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-15 09:14:11 +02:00
focalboard/server/services/store/store.go

32 lines
1.3 KiB
Go
Raw Normal View History

//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"
// 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 20:16:59 +02: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
Shutdown() error
GetSystemSettings() (map[string]string, error)
SetSystemSetting(key string, value string) error
2020-11-06 17:46:35 +02: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-12-07 18:04:35 +02:00
GetSession(token string, expireTime int64) (*model.Session, error)
2020-12-02 22:12:14 +02:00
CreateSession(session *model.Session) error
RefreshSession(session *model.Session) error
UpdateSession(session *model.Session) error
DeleteSession(sessionId string) error
2020-12-07 18:04:35 +02:00
CleanUpSessions(expireTime int64) error
2020-10-16 19:20:43 +02:00
}