Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMockedError = errors.New("storage mocked error")
ErrMockedError represents a storage mocked error value.
Functions ¶
func ActivateMockedError ¶
func ActivateMockedError()
ActivateMockedError forces the return of ErrMockedError from current storage manager. This method should only be used for testing purposes.
func DeactivateMockedError ¶
func DeactivateMockedError()
DeactivateMockedError disables mocked storage error from a previous activation. This method should only be used for testing purposes.
func Initialize ¶
Initialize initializes storage sub system.
Types ¶
type Storage ¶
type Storage interface { Shutdown() InsertOrUpdateUser(user *model.User) error DeleteUser(username string) error FetchUser(username string) (*model.User, error) UserExists(username string) (bool, error) InsertOrUpdateRosterItem(ri *model.RosterItem) error DeleteRosterItem(user, contact string) error FetchRosterItems(user string) ([]model.RosterItem, error) FetchRosterItem(user, contact string) (*model.RosterItem, error) InsertOrUpdateRosterNotification(rn *model.RosterNotification) error DeleteRosterNotification(user, contact string) error FetchRosterNotifications(contact string) ([]model.RosterNotification, error) InsertOrUpdateVCard(vCard xml.Element, username string) error FetchVCard(username string) (xml.Element, error) FetchPrivateXML(namespace string, username string) ([]xml.Element, error) InsertOrUpdatePrivateXML(privateXML []xml.Element, namespace string, username string) error InsertOfflineMessage(message xml.Element, username string) error CountOfflineMessages(username string) (int, error) FetchOfflineMessages(username string) ([]xml.Element, error) DeleteOfflineMessages(username string) error }
Storage represents an entity storage interface.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.