Documentation
¶
Index ¶
- 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, val User) (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
- type Payload
- type Response
- type ResponseDataUser
- type ResponseEncode
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareHashPass ¶
func CompareUsername ¶ added in v0.0.4
func DecodeGetRole ¶ added in v0.0.7
func DecodeGetRoleandUser ¶ added in v0.0.7
func DecodeGetUser ¶ added in v0.0.7
func EncodeWithRole ¶ added in v0.0.7
func GCFPasetoTokenStr ¶
func GCFPasswordHasher ¶
func GetDataUserFromGCF ¶
func InsertDataUserGCF ¶ added in v0.0.2
func InsertOneDoc ¶ added in v0.0.2
func InsertUserdata ¶ added in v0.0.2
func MongoCreateConnection ¶
func PasswordValidator ¶
func ReturnStringStruct ¶
func TokenEncoder ¶
Types ¶
type Credential ¶
type Payload ¶ added in v0.0.7
type Response ¶
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseDataUser ¶ added in v0.0.4
type ResponseEncode ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.