Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { LoginUser(user *entities.User) (*entities.User, error) GetUser(uid string) (*entities.User, error) GetUsers() (*[]entities.User, error) FindUsersByUID(uid []string) (*[]entities.User, error) FindUserByUsername(username string) (*entities.User, error) CheckPasswordHash(hash, password string) error UpdatePassword(userPassword *entities.UserPassword, isAdminBeingReset bool) error CreateUser(user *entities.User) (*entities.User, error) UpdateUser(user *entities.UserDetails) error UpdateUserByQuery(filter bson.D, updateQuery bson.D) error IsAdministrator(user *entities.User) error UpdateUserState(ctx context.Context, username string, isDeactivate bool, deactivateTime int64) error InviteUsers(invitedUsers []string) (*[]entities.User, error) }
Repository holds the mongo database implementation of the Service
func NewRepo ¶
func NewRepo(collection *mongo.Collection) Repository
NewRepo creates a new instance of this repository
Click to show internal directories.
Click to hide internal directories.