modul

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePassword

func ChangePassword(db *mongo.Database, col string, userdata model.User) (user model.User, status bool, err error)

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func DeleteUser

func DeleteUser(db *mongo.Database, col string, username string) error

func GCFHandler

func GCFHandler(MONGOCONNSTRINGENV, dbname, col string) string

func GCFHandlerChangePassword

func GCFHandlerChangePassword(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerDeleteUser

func GCFHandlerDeleteUser(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerGetUser

func GCFHandlerGetUser(MONGOCONNSTRINGENV, dbname, col string, username string) string

func GCFHandlerLogIn

func GCFHandlerLogIn(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerRegister

func GCFHandlerRegister(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerUpdateUser added in v0.0.5

func GCFHandlerUpdateUser(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func GetAllUser

func GetAllUser(db *mongo.Database, col string) (userlist []model.User)

func GetCatalogFromID

func GetCatalogFromID(db *mongo.Database, col string, id primitive.ObjectID) (catalog model.Catalog)

func GetCatalogList

func GetCatalogList(db *mongo.Database, col string) (cataloglist model.CatalogList)

func GetUserFromEmail

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

func GetUserFromID

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

func GetUserFromUsername

func GetUserFromUsername(db *mongo.Database, col string, username string) (user model.User, err error)

func HashPassword

func HashPassword(password string) (string, error)

func InsertCatalog

func InsertCatalog(db *mongo.Database, col string, catalog model.Catalog) (insertedID primitive.ObjectID, err error)

catalog

func InsertOneDoc

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

func LogIn

func LogIn(db *mongo.Database, col string, userdata model.User) (user model.User, status bool, err error)

func MongoConnect

func MongoConnect(MongoString, dbname string) *mongo.Database

func Register

func Register(db *mongo.Database, col string, userdata model.User) error

user

func UpdateUser added in v0.0.5

func UpdateUser(db *mongo.Database, col string, userdata model.User) (user model.User, status bool, 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