Documentation
¶
Index ¶
- func CheckPasswordHash(passwordhash, hash string) bool
- 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 CreateUserAndAddedToeken(PASETOPRIVATEKEYENV string, mongoconn *mongo.Database, collection string, ...) interface{}
- func DeleteUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func GCFCreateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindUserByID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindUserByName(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginTest(username, passwordhash, MONGOCONNSTRINGENV, dbname, collectionname string) bool
- func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFPostHandlerEmail(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFReturnStruct(DataStuct any) string
- func GCFUpdateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GFCPostHandlerUser(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GetConnectionMongo(MongoString, dbname string) *mongo.Database
- func HashPassword(passwordhash string) (string, error)
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertUser(db *mongo.Database, collection string, userdata User) string
- func InsertUserdata(MongoConn *mongo.Database, ...) (InsertedID interface{})
- func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool
- func IsPasswordValidEmail(mongoconn *mongo.Database, collection string, userdata User) bool
- func Login(Privatekey, MongoEnv, dbname, Colname string, r *http.Request) string
- func Register(Mongoenv, dbname string, r *http.Request) string
- func ReplaceOneDoc(mongoconn *mongo.Database, collection string, filter bson.M, userdata User) interface{}
- func ReturnStringStruct(Data any) string
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- type Credential
- type Response
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func CreateNewUserRole ¶
func CreateUser ¶
func CreateUserAndAddToken ¶
func DeleteUser ¶
func GCFCreateHandler ¶
func GCFDeleteHandler ¶
func GCFFindUserByID ¶
func GCFFindUserByName ¶
func GCFLoginTest ¶
func GCFPostHandler ¶
func GCFPostHandlerEmail ¶ added in v0.1.3
func GCFReturnStruct ¶
func GCFUpdateHandler ¶
func GFCPostHandlerUser ¶
func GetConnectionMongo ¶
func HashPassword ¶
func InsertOneDoc ¶
func InsertUserdata ¶
func IsPasswordValid ¶
func IsPasswordValidEmail ¶ added in v0.1.4
func ReplaceOneDoc ¶
func ReturnStringStruct ¶
func SetConnection ¶
Types ¶
type Credential ¶
type Response ¶
type Response struct { Status bool `json:"status" bson:"status"` Message string `json:"message" bson:"message"` Data interface{} `json:"data" bson:"data"` }
func CreateResponse ¶
type User ¶
type User struct { Username string `json:"username" bson:"username"` NPM string `json:"npm" bson:"npm"` Password string `json:"password" bson:"password"` PasswordHash string `json:"passwordhash" bson:"passwordhash"` Email string `bson:"email,omitempty" json:"email,omitempty"` Role string `json:"role,omitempty" bson:"role,omitempty"` Token string `json:"token,omitempty" bson:"token,omitempty"` Private string `json:"private,omitempty" bson:"private,omitempty"` Public string `json:"public,omitempty" bson:"public,omitempty"` }
Click to show internal directories.
Click to hide internal directories.