Documentation
¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func CompareUsername(mongoenv *mongo.Database, collname, username string) bool
- func CreateNewUserRole(mongoenv *mongo.Database, collname string, userdata User) interface{}
- func CreateUserAndAddedToeken(privatekey string, mongoenv *mongo.Database, collname string, userdata User) interface{}
- func DeleteUser(mongoenv *mongo.Database, collname string, userdata User) interface{}
- func HapusUser(mongoenv, dbname, collname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func InsertUserdata(mongoenv *mongo.Database, collname, username, role, password string) (InsertedID interface{})
- func IsPasswordValid(mongoenv *mongo.Database, collname string, userdata User) bool
- func MembuatTokenUser(privatekey, mongoenv, dbname, collname string, r *http.Request) string
- func MembuatUser(mongoenv, dbname, collname string, r *http.Request) string
- func ReplaceOneDoc(mongoenv *mongo.Database, collname string, filter bson.M, userdata User) interface{}
- func ReturnStruct(DataStuct any) string
- func SetConnection(mongoenv, dbname string) *mongo.Database
- type Credential
- type Properties
- type Response
- type ResponseDataUser
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func CompareUsername ¶ added in v1.0.2
func CreateNewUserRole ¶
func CreateUserAndAddedToeken ¶ added in v1.0.2
func DeleteUser ¶
func HashPassword ¶
func InsertUserdata ¶ added in v1.0.2
func IsPasswordValid ¶
func MembuatTokenUser ¶ added in v1.0.2
func MembuatUser ¶ added in v1.0.2
func ReplaceOneDoc ¶
func ReturnStruct ¶ added in v1.0.2
func SetConnection ¶
Types ¶
type Credential ¶
type Properties ¶
type Properties struct {
Name string `json:"name" bson:"name"`
}
type Response ¶ added in v1.0.2
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseDataUser ¶ added in v1.0.2
type User ¶
type User struct { Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` Role string `json:"role,omitempty" bson:"role,omitempty"` Token string `json:"token,omitempty" bson:"token,omitempty"` Private string `json:"private,omitempty" bson:"private,omitempty"` Publick string `json:"publick,omitempty" bson:"publick,omitempty"` }
func FindUserUser ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.