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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contacts

type Contacts struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"`
	FirstName string             `bson:"first_name"`
	LastName  string             `bson:"last_name"`
	PhotoURL  string             `bson:"photo_url"`
	IsOnline  bool               `bson:"is_online"`
	IsBanned  bool               `bson:"is_banned"`
}

type UserProfile

type UserProfile struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"`
	Email     string             `bson:"email"`
	Username  string             `bson:"username"`
	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"`
	CreatedAt time.Time          `bson:"created_at"`
	UpdatedAt time.Time          `bson:"updated_at"`
}

type UserRepository

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

func NewUserRepository

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

func (UserRepository) GetContacts

func (r UserRepository) GetContacts(ctx context.Context) ([]*models.Contacts, error)

func (UserRepository) GetUserProfile

func (r UserRepository) GetUserProfile(ctx context.Context, uID string) (*models.User, error)

Jump to

Keyboard shortcuts

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