persistence

package
Version: v0.0.0-...-caf6f44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPersistenceController

type AuthPersistenceController interface {
	StartReadTransaction() (AuthPersistenceReadTransaction, *fcerror.Error)
	StartReadWriteTransaction() (AuthPersistenceReadWriteTransaction, *fcerror.Error)
}

type AuthPersistenceReadTransaction

type AuthPersistenceReadTransaction interface {
	ReadTransaction
	GetSessionByToken(token models.Token) (*models.Session, *fcerror.Error)
}

type AuthPersistenceReadWriteTransaction

type AuthPersistenceReadWriteTransaction interface {
	ReadWriteTransaction
	AuthPersistenceReadTransaction
	SaveSession(session *models.Session) *fcerror.Error
	DeleteSessionByToken(token models.Token) *fcerror.Error
	DeleteExpiredSessions() *fcerror.Error
}

type NodePersistenceController

type NodePersistenceController interface {
	StartReadTransaction() (NodePersistenceReadTransaction, *fcerror.Error)
	StartReadWriteTransaction() (NodePersistenceReadWriteTransaction, *fcerror.Error)
}

type NodePersistenceReadTransaction

type NodePersistenceReadTransaction interface {
	ReadTransaction
	GetNodeByPath(userID models.UserID, path string, includedShareMode models.ShareMode) (*models.Node, *fcerror.Error)
	GetNodeByID(userID models.UserID, nodeID models.NodeID, includedShareMode models.ShareMode) (*models.Node, *fcerror.Error)
	ListByID(userID models.UserID, nodeID models.NodeID, includedShareMode models.ShareMode) ([]*models.Node, *fcerror.Error)
}

type NodePersistenceReadWriteTransaction

type NodePersistenceReadWriteTransaction interface {
	ReadWriteTransaction
	NodePersistenceReadTransaction
	CreateUserRootFolder(userID models.UserID) (bool, *fcerror.Error)
	CreateNodeByID(userID models.UserID, node *models.Node) (bool, *fcerror.Error)
}

type ReadTransaction

type ReadTransaction interface {
	Close() *fcerror.Error
}

type ReadWriteTransaction

type ReadWriteTransaction interface {
	// Should either rollback or commit depending on preceding error
	Finish(fcerr *fcerror.Error) *fcerror.Error
	Commit() *fcerror.Error
	Rollback()
}

ReadWriteTransaction stands for a transaction of any persistence plugin

type SharePersistenceController

type SharePersistenceController interface {
	StartReadTransaction() (SharePersistenceReadTransaction, *fcerror.Error)
	StartReadWriteTransaction() (SharePersistenceReadWriteTransaction, *fcerror.Error)
}

type SharePersistenceReadTransaction

type SharePersistenceReadTransaction interface {
	ReadTransaction
	NodeContainsNestedShares(nodeID models.NodeID) (bool, *fcerror.Error)
}

type SharePersistenceReadWriteTransaction

type SharePersistenceReadWriteTransaction interface {
	ReadWriteTransaction
	SharePersistenceReadTransaction
	CreateShare(userID models.UserID, share *models.Share, insertName string) (bool, *fcerror.Error)
}

type UserPersistenceController

type UserPersistenceController interface {
	StartReadTransaction() (UserPersistenceReadTransaction, *fcerror.Error)
	StartReadWriteTransaction() (UserPersistenceReadWriteTransaction, *fcerror.Error)
}

type UserPersistenceReadTransaction

type UserPersistenceReadTransaction interface {
	ReadTransaction
	CountUsers() (int64, *fcerror.Error)
	GetUserByID(userID models.UserID) (*models.User, *fcerror.Error)
	GetUserByEmail(email string) (*models.User, *fcerror.Error)
}

type UserPersistenceReadWriteTransaction

type UserPersistenceReadWriteTransaction interface {
	ReadWriteTransaction
	UserPersistenceReadTransaction
	SaveUser(*models.User) *fcerror.Error
	UpdateUser(*models.User) *fcerror.Error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL