mongo

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

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

Mongo contains function for user mongodb.

func New

func New(db *mongo.Database) *Mongo

New to create new user mongodb.

func (*Mongo) GetByID

func (m *Mongo) GetByID(ctx context.Context, id int64) (*entity.User, int, error)

GetByID to get by id.

func (*Mongo) Upsert

func (m *Mongo) Upsert(ctx context.Context, data entity.User) (int, error)

Upsert to upsert user.

Jump to

Keyboard shortcuts

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