repository

package
v0.0.0-...-1bcb742 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 7 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 struct {
	Db *mongo.Mongo
}

func NewRepository

func NewRepository(db *mongo.Mongo) *Repository

func (*Repository) AddUser

func (r *Repository) AddUser(ctx context.Context, name, email, password string) (string, error)

func (*Repository) GetUserByEmail

func (r *Repository) GetUserByEmail(ctx context.Context, email string) (*domain.User, error)

func (*Repository) GetUserByID

func (r *Repository) GetUserByID(ctx context.Context, userID string) (*domain.User, error)

func (*Repository) GetUserByName

func (r *Repository) GetUserByName(ctx context.Context, name string) (*domain.User, error)

func (*Repository) GetUsers

func (r *Repository) GetUsers(ctx context.Context, skip, limit int) ([]domain.User, error)

func (*Repository) GetUsersTotalCount

func (r *Repository) GetUsersTotalCount(ctx context.Context) (int, error)

Jump to

Keyboard shortcuts

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