mongo

package
v0.0.0-...-8c446f2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRepository

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

func NewAuthRepository

func NewAuthRepository(db *mongo.Database, collection string) *AuthRepository

func (AuthRepository) CreateUser

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

func (AuthRepository) GetUser

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

type User

type User struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"`
	Email     string             `bson:"email"`
	Username  string             `bson:"username"`
	Password  string             `bson:"password"`
	PhotoURL  string             `bson:"photo_url"`
	FirstName string             `bson:"first_name"`
	LastName  string             `bson:"last_name"`
	IsOnline  bool               `bson:"is_online"`
	IsBanned  bool               `bson:"is_banned"`
}

Jump to

Keyboard shortcuts

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