db

package
v0.0.0-...-66ab54c Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoConnection

type MongoConnection struct {
	MongoClient      *mongo.Client
	ContexWithCancel context.Context
	FuncCancel       context.CancelFunc
}

func NewMongoConnection

func NewMongoConnection() *MongoConnection

func (*MongoConnection) CancelConection

func (mc *MongoConnection) CancelConection()

func (*MongoConnection) FindOne

func (mc *MongoConnection) FindOne(key primitive.ObjectID, collection string) ([]byte, error)

func (*MongoConnection) InsetOne

func (mc *MongoConnection) InsetOne(document bson.D, collection string)

type User

type User struct {
	ID primitive.ObjectID
}

func (*User) InsertDeposit

func (u *User) InsertDeposit(mc *MongoConnection, d application.Deposits)

Write

func (*User) ReadDeposit

func (u *User) ReadDeposit(mc *MongoConnection) (rest *application.Deposits)
Deposits

Read

func (*User) ReadProfile

func (u *User) ReadProfile(mc *MongoConnection) (rest *application.Perfil)

Read

Jump to

Keyboard shortcuts

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