user

package
v0.0.0-...-89d7f24 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

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