Versions in this module Expand all Collapse all v0 v0.0.1 Oct 14, 2024 Changes in this version + var JwtKey = []byte("your_secret_key") + func CheckPasswordHash(password, hash string) bool + func GCFReturnStruct(DataStuct any) string + func GenerateJWT(email, role, secretKey string) (string, error) + func GetAllDocs[T any](db *mongo.Database, col string, filter bson.M) (docs T, err error) + func GetUserFromEmail(email string, db *mongo.Database) (doc models.User, err error) + func GetUserFromID(_id primitive.ObjectID, db *mongo.Database) (doc models.User, err error) + func InsertOneDoc(db *mongo.Database, col string, doc any) (insertedID primitive.ObjectID, err error) + func MongoConnect(mconn DBInfo) (db *mongo.Database, err error) + func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database + type Claims struct + Email string + Role string + type DBInfo struct + DBName string + DBString string