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 ¶ added in v0.0.5
func CompareUsername ¶ added in v0.0.5
func DecodeGetRole ¶ added in v0.0.5
func DecodeGetRoleandUser ¶ added in v0.0.5
func DecodeGetUser ¶ added in v0.0.5
func EncodeWithRole ¶ added in v0.0.5
func GCFPasetoTokenStr ¶ added in v0.0.5
<---Function untuk token--->
func GCFPasswordHasher ¶ added in v0.0.5
func GetDataUserFromGCF ¶ added in v0.0.5
<---Function untuk ambil data lewat gcf--->
func InsertDataUserGCF ¶ added in v0.0.5
func InsertOneDoc ¶ added in v0.0.5
func InsertUserdata ¶ added in v0.0.5
func MongoCreateConnection ¶ added in v0.0.5
func PasswordValidator ¶ added in v0.0.5
func ReturnStringStruct ¶ added in v0.0.3
func TokenEncoder ¶ added in v0.0.5
Types ¶
type Credential ¶
type Payload ¶ added in v0.0.5
type Response ¶ added in v0.0.5
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseDataUser ¶ added in v0.0.5
type ResponseEncode ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.