Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StormCodec = storm.Codec(msgpack.Codec)
StormCodec is the format used to store data in the database.
Functions ¶
Types ¶
type Client ¶
type Client interface {
// Save inserts or updates the entry in database with the given model.
Save(m model.Model) error
// Close the database.
Close() error
// IsNotFound returns true if err is nil or a not found error.
IsNotFound(err error) bool
UserInteraction
ItemInteraction
}
A Client can interacts with the database.
type ItemInteraction ¶
type ItemInteraction interface {
// FindItemsByParams returns all the matching records for the given parameters.
// It also returns a boolean to true if there is more items than the given limit.
FindItemsByParams(userID, contentType string, updated time.Time, strictTime, filterDeleted bool, limit int) ([]*model.Item, bool, error)
// FindItemsForIntegrityCheck returns valid items for computing data signature forthe given user.
FindItemsForIntegrityCheck(userID string) ([]*model.Item, error)
// DeleteItem deletes the item matching the given parameters.
DeleteItem(id, userID string) error
}
An ItemInteraction defines all the methods used to interact with a item record(s).
type UserInteraction ¶
type UserInteraction interface {
// FindUser returns the user for the given id (UUID).
FindUser(id string) (*model.User, error)
// FindUserByMail returns the user for the given email.
FindUserByMail(email string) (*model.User, error)
}
An UserInteraction defines all the methods used to interact with a user record.
Click to show internal directories.
Click to hide internal directories.