module

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoString string = os.Getenv("MONGOSTRING")

Functions

func DeleteDocsByID added in v0.0.5

func DeleteDocsByID(_id primitive.ObjectID, db *mongo.Database, col string) error

func GetAllDocs added in v0.0.2

func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}

func GetDocFromID added in v0.0.5

func GetDocFromID(_id primitive.ObjectID, db *mongo.Database, col string, doc interface{}) (interface{}, error)

func GetDocFromID2 added in v0.0.5

func GetDocFromID2(_id primitive.ObjectID, db *mongo.Database, col string) (doc model.User, err error)

func GetUserFromEmail

func GetUserFromEmail(email string, db *mongo.Database, col string) (result model.User, err error)

func InsertOneDoc

func InsertOneDoc(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)

func LogIn added in v0.0.3

func LogIn(db *mongo.Database, col string, insertedDoc model.User) (email string, err error)

func MongoConnect

func MongoConnect() *mongo.Database

func SignUp added in v0.0.2

func SignUp(db *mongo.Database, col string, insertedDoc model.User) (insertedID primitive.ObjectID, err error)

func UpdateOneDoc added in v0.0.5

func UpdateOneDoc(db *mongo.Database, col string, id primitive.ObjectID, doc interface{}) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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