Versions in this module Expand all Collapse all v0 v0.0.1 Nov 29, 2023 Changes in this version + func CompareHashPass(password, hash string) bool + func CompareUsername(MongoConn *mongo.Database, Colname, username string) bool + func DecodeGetRole(PublicKey, tokenStr string) (pay string, err error) + func DecodeGetRoleandUser(PublicKey, tokenStr string) (pay string, use string) + func DecodeGetUser(PublicKey, tokenStr string) (pay string, err error) + func EncodeWithRole(role, username, privatekey string) (string, error) + func GCFPasetoTokenStr(PrivateKey, MongoEnv, dbname, collectionname string, r *http.Request) string + func GCFPasswordHasher(r *http.Request) string + func GetDataUserFromGCF(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string + func HashPass(password string) (string, error) + func InsertDataUserGCF(Mongoenv, dbname string, r *http.Request) string + func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{}) + func InsertUserdata(MongoConn *mongo.Database, username, role, password string) (InsertedID interface{}) + func MongoCreateConnection(MongoString, dbname string) *mongo.Database + func PasswordValidator(MongoConn *mongo.Database, colname string, userdata User) bool + func ReturnStringStruct(Data any) string + func TokenEncoder(username, privatekey string) string + type Credential struct + Message string + Status bool + Token string + type Payload struct + Exp time.Time + Iat time.Time + Nbf time.Time + Role string + User string + func Decoder(publickey, tokenstr string) (payload Payload, err error) + type Response struct + Token string + type ResponseDataUser struct + Data []User + Message string + Status bool + type ResponseEncode struct + Message string + Token string + type User struct + Password string + Role string + Username string + func GetAllUser(MongoConn *mongo.Database, colname string) []User + func GetOneUser(MongoConn *mongo.Database, colname string, userdata User) User