mongo

package
v0.0.0-...-4db4453 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID       primitive.ObjectID `bson:"_id,omitempty"`
	Username string             `bson:"username"`
	Password string             `bson:"password"`
}

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *mongo.Database, collection string) *UserRepository

func (UserRepository) CreateUser

func (r UserRepository) CreateUser(ctx context.Context, user *models.User) (*models.User, error)

func (UserRepository) GetUser

func (r UserRepository) GetUser(ctx context.Context, username, password string) (*models.User, error)

Jump to

Keyboard shortcuts

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