Versions in this module Expand all Collapse all v0 v0.0.1 May 19, 2024 Changes in this version + func CheckPasswordHash(passwordhash, hash string) bool + func CreateAdmin(mongoconn *mongo.Database, collection string, admindata Admin) interface + func CreateNewUserRole(mongoconn *mongo.Database, collection string, userdata User) interface + func CreateUser(mongoconn *mongo.Database, collection string, userdata User) interface + func CreateUserAndAddToken(privateKeyEnv string, mongoconn *mongo.Database, collection string, ...) error + func GCFReturnStruct(DataStuct any) string + func HashPass(passwordhash string) (string, error) + func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{}) + func InsertUserdata(MongoConn *mongo.Database, ...) (InsertedID interface{}) + func IsPasswordValidEmail(mongoconn *mongo.Database, collection string, userdata User) bool + func IsPasswordValidEmailAdmin(mongoconn *mongo.Database, collection string, admindata Admin) bool + func IsPasswordValidNPM(mongoconn *mongo.Database, collection string, userdata User) bool + func LoginAdmin(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string + func LoginUser(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string + func MongoCreateConnection(MongoString, dbname string) *mongo.Database + func Register(Mongoenv, dbname string, r *http.Request) string + func ReturnStringStruct(Data any) string + func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database + type Admin struct + Email string + Password string + PasswordHash string + Private string + Public string + Role string + Token string + Username string + UsernameId string + type Credential struct + Message string + Status bool + Token string + type EmailValidator struct + func NewEmailValidator() *EmailValidator + func (v *EmailValidator) IsValid(email string) bool + type Payload struct + Exp time.Time + Iat time.Time + Nbf time.Time + Role string + User string + type Response struct + Data interface{} + Message string + Status bool + type User struct + Email string + ID primitive.ObjectID + Nohp string + Password string + PasswordHash string + Private string + Public string + Role string + Token string + Username string + UsernameId string