Documentation ¶
Index ¶
- type MongoDB
- func (m *MongoDB) ActivateUser(id, token string) error
- func (m *MongoDB) Add(i interface{}) (string, error)
- func (m *MongoDB) AddToken(id string, tokens ...string) error
- func (m *MongoDB) CreateUser(username, firstname, lastname, email, passwordSalt, passwordHash, ... string) error
- func (m *MongoDB) Get(filter bson.M) (*models.User, error)
- func (m *MongoDB) GetByEmail(email string) (*models.User, error)
- func (m *MongoDB) GetByID(id string) (*models.User, error)
- func (m *MongoDB) GetByUsername(username string) (*models.User, error)
- func (m *MongoDB) SetStorageLimit(id string, limitByte int64) error
- func (m *MongoDB) UpdateOne(filter, update bson.M) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
func (*MongoDB) ActivateUser ¶
ActivateUser activates a user, based on a provided activation token
func (*MongoDB) CreateUser ¶
func (m *MongoDB) CreateUser(username, firstname, lastname, email, passwordSalt, passwordHash, activationToken string) error
CreateUser adds a new user to the database with no rights, and not activated yet
func (*MongoDB) GetByEmail ¶
GetByEmail returns a user model based on a provided email
func (*MongoDB) GetByUsername ¶
GetByUsername returns a user model based on a provided username
func (*MongoDB) SetStorageLimit ¶
SetStorageLimit sets the storage limit object to a specific user
Click to show internal directories.
Click to hide internal directories.