beurse

package
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func DeleteAllHistoryByUser added in v0.0.14

func DeleteAllHistoryByUser(conn *mongo.Database, collectionname string, userId string) error

func DeleteDeviceByID added in v0.0.12

func DeleteDeviceByID(id primitive.ObjectID, db *mongo.Database) error

func DeleteOneDoc

func DeleteOneDoc(_id primitive.ObjectID, db *mongo.Database, col string) error

func EditDevice added in v0.0.21

func EditDevice(idparam primitive.ObjectID, iduser string, db *mongo.Database, doc model.Device) (bson.M, error)

func GCFDeleteAllHistory added in v0.0.14

func GCFDeleteAllHistory(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFGetDevice

func GCFGetDevice(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFGetDeviceByEmail added in v0.0.8

func GCFGetDeviceByEmail(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFGetHistory added in v0.0.14

func GCFGetHistory(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFGetUserByEmail added in v0.0.18

func GCFGetUserByEmail(MONGOCONNSTRINGENV, PASETOPUBLICKEYENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerDeleteDevice added in v0.0.9

func GCFHandlerDeleteDevice(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerGetAll added in v0.0.8

func GCFHandlerGetAll(MONGOCONNSTRINGENV, dbname, col string, docs interface{}) string

func GCFHandlerLogin

func GCFHandlerLogin(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerLoginWhatsauth added in v0.0.21

func GCFHandlerLoginWhatsauth(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerResetPassword added in v0.0.17

func GCFHandlerResetPassword(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerSendOTP added in v0.0.17

func GCFHandlerSendOTP(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerSignup

func GCFHandlerSignup(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerUpdateDevice added in v0.0.9

func GCFHandlerUpdateDevice(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerUpdateStatusDevice added in v0.0.16

func GCFHandlerUpdateStatusDevice(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerVerifyOTP added in v0.0.17

func GCFHandlerVerifyOTP(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFInsertDevice added in v0.0.7

func GCFInsertDevice(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFInsertHistory added in v0.0.14

func GCFInsertHistory(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func GenerateExpiredAt added in v0.0.17

func GenerateExpiredAt() int64

func GetAllDevice added in v0.0.8

func GetAllDevice(mongoconn *mongo.Database, collection string) []model.Device

Device

func GetAllDocs

func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}

func GetAllHistory added in v0.0.14

func GetAllHistory(mongoconn *mongo.Database, collection string) []model.History

History

func GetAllUser added in v0.0.8

func GetAllUser(mongoconn *mongo.Database, collection string) []model.User

func GetDeviceByID added in v0.0.21

func GetDeviceByID(_id primitive.ObjectID, db *mongo.Database) (doc model.Device, err error)

func GetDevicesByUser added in v0.0.8

func GetDevicesByUser(conn *mongo.Database, collectionname string, email string) ([]model.Device, error)

func GetDocsByFilter added in v0.0.8

func GetDocsByFilter(db *mongo.Database, collectionName string, filter bson.M) ([]bson.M, error)

func GetHistoryByUser added in v0.0.14

func GetHistoryByUser(conn *mongo.Database, collectionname string, email string) ([]model.History, error)

func GetID added in v0.0.12

func GetID(r *http.Request) string

func GetOTPbyEmail added in v0.0.17

func GetOTPbyEmail(email string, db *mongo.Database) (doc model.Otp, err error)

func GetUserFromEmail

func GetUserFromEmail(email string, db *mongo.Database) (doc model.User, err error)

func GetUserFromID

func GetUserFromID(_id primitive.ObjectID, db *mongo.Database) (doc model.User, err error)

func GetUserFromPhoneNumber added in v0.0.17

func GetUserFromPhoneNumber(phonenumber string, db *mongo.Database) (doc model.User, err error)

func HashPassword

func HashPassword(password string) (string, error)

func InsertDevice added in v0.0.21

func InsertDevice(iduser string, db *mongo.Database, doc model.Device) (bson.M, error)

func InsertOneDoc

func InsertOneDoc(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)

func IsPasswordValid added in v0.0.8

func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata model.User) bool

func MongoConnect

func MongoConnect(MongoString, dbname string) *mongo.Database

func OtpGenerate added in v0.0.17

func OtpGenerate() (string, error)

OTP

func ResetPassword added in v0.0.17

func ResetPassword(db *mongo.Database, email, otp, password string) (string, error)

func SendOTP added in v0.0.17

func SendOTP(db *mongo.Database, email string) (string, error)

func SetConnection added in v0.0.8

func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database

func SignIn

func SignIn(db *mongo.Database, col string, insertedDoc model.User) (user model.User, Status bool, err error)

func SignUp

func SignUp(db *mongo.Database, col string, insertedDoc model.User) error

User

func UpdateDeviceByID added in v0.0.13

func UpdateDeviceByID(id primitive.ObjectID, db *mongo.Database, doc model.Device) error

func UpdateDeviceStatusByID added in v0.0.15

func UpdateDeviceStatusByID(id primitive.ObjectID, db *mongo.Database, fieldName string, fieldValue interface{}) error

func UpdateOneDoc

func UpdateOneDoc(db *mongo.Database, col string, id primitive.ObjectID, doc interface{}) (err error)

func ValidatePhoneNumber added in v0.0.17

func ValidatePhoneNumber(phoneNumber string) (bool, error)

func VerifyOTP added in v0.0.17

func VerifyOTP(db *mongo.Database, email, otp string) (string, error)

func Waktu added in v0.0.14

func Waktu(s string) time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL