Documentation ¶
Index ¶
- type UserEntityMongo
- type UserRepository
- func (ur *UserRepository) CreateUser(ctx context.Context, userEntity *user_entity.User) *internal_error.InternalError
- func (ur *UserRepository) FindUserById(ctx context.Context, userId string) (*user_entity.User, *internal_error.InternalError)
- func (ur *UserRepository) FindUsers(ctx context.Context) ([]user_entity.User, *internal_error.InternalError)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserEntityMongo ¶
type UserRepository ¶
type UserRepository struct {
Collection database.CollectionAPI
}
func NewUserRepository ¶
func NewUserRepository(database *mongo.Database) *UserRepository
func (*UserRepository) CreateUser ¶
func (ur *UserRepository) CreateUser( ctx context.Context, userEntity *user_entity.User) *internal_error.InternalError
func (*UserRepository) FindUserById ¶
func (ur *UserRepository) FindUserById( ctx context.Context, userId string) (*user_entity.User, *internal_error.InternalError)
func (*UserRepository) FindUsers ¶
func (ur *UserRepository) FindUsers( ctx context.Context) ([]user_entity.User, *internal_error.InternalError)
Click to show internal directories.
Click to hide internal directories.