Documentation ¶
Index ¶
- Variables
- 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
- type DBInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var JwtKey = []byte("your_secret_key")
Functions ¶
func CheckPasswordHash ¶
func GCFReturnStruct ¶
func GenerateJWT ¶
func GetAllDocs ¶
func GetUserFromEmail ¶
func GetUserFromID ¶
func InsertOneDoc ¶
func SetConnection ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.