package
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Oct 17, 2023
License: MIT, MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func CheckPasswordHash(password, hash string) bool
-
func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
-
func GCFReturnStruct(DataStuct any) string
-
func HashPassword(password string) (string, error)
-
func InsertUser(db *mongo.Database, collection string, userdata User) string
-
func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool
-
func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
-
type Credential
-
type User
func CheckPasswordHash(password, hash string) bool
func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
type Credential struct {
Status bool `json:"status" bson:"status"`
Token string `json:"token,omitempty" bson:"token,omitempty"`
Message string `json:"message,omitempty" bson:"message,omitempty"`
}
type User struct {
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
Role string `json:"role,omitempty" bson:"role,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.