repository

package
v0.0.0-...-2f27ceb Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthRepo

func NewAuthRepo(db *mongo.Database) auth.Repository

Types

type AuthRepo

type AuthRepo struct {
	// contains filtered or unexported fields
}

func (*AuthRepo) AddMonster

func (r *AuthRepo) AddMonster(ctx context.Context, userID, monsterID primitive.ObjectID) error

func (*AuthRepo) CreateUser

func (r *AuthRepo) CreateUser(ctx context.Context, user *domain.User) (*domain.User, error)

func (*AuthRepo) DeleteUser

func (r *AuthRepo) DeleteUser(ctx context.Context, userID primitive.ObjectID) error

func (*AuthRepo) FetchUsers

func (r *AuthRepo) FetchUsers(ctx context.Context, pq *utils.PaginationQuery) (*domain.UserList, error)

func (*AuthRepo) FindByID

func (r *AuthRepo) FindByID(ctx context.Context, userID primitive.ObjectID) (*domain.User, error)

func (*AuthRepo) FindByUsername

func (r *AuthRepo) FindByUsername(ctx context.Context, username string) (*domain.User, error)

func (*AuthRepo) UpdateUser

func (r *AuthRepo) UpdateUser(ctx context.Context, user *domain.UserUpdate) (*domain.UserUpdate, error)

Jump to

Keyboard shortcuts

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