module

package
v0.0.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Responsed model.Credential
)

Functions

func ChangePassword added in v0.0.14

func ChangePassword(db *mongo.Database, col string, userdata model.User) (user model.User, status bool, err error)

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func DeleteOneDoc

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

func DeletePemasukan

func DeletePemasukan(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)

func DeletePengeluaran

func DeletePengeluaran(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)

func DeleteUser added in v0.0.14

func DeleteUser(db *mongo.Database, col string, userdata model.User) (bool, error)

func GCFHandlerChangePassword added in v0.0.14

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

func GCFHandlerDeletePemasukan

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

func GCFHandlerDeletePengeluaran

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

func GCFHandlerDeleteUser added in v0.0.14

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

func GCFHandlerGetAllUser added in v0.0.7

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

func GCFHandlerGetPemasukanFromID

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

func GCFHandlerGetPemasukanFromUser added in v0.0.13

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

func GCFHandlerGetPengeluaranFromID

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

func GCFHandlerGetPengeluaranFromUser added in v0.0.13

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

func GCFHandlerGetUserFromID

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

func GCFHandlerGetUserFromToken added in v0.0.14

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

func GCFHandlerGetUserFromUsername added in v0.0.7

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

func GCFHandlerInsertPemasukan

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

func GCFHandlerInsertPengeluaran

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

func GCFHandlerSignin

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

func GCFHandlerSignup

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

func GCFHandlerUpdatePemasukan

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

func GCFHandlerUpdatePengeluaran

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

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

return

func GetAllDocs

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

CRUD

func GetAllUser added in v0.0.7

func GetAllUser(db *mongo.Database, col string) (userlist []model.User, err error)

func GetID added in v0.0.4

func GetID(r *http.Request) string

get id

func GetPemasukanFromID

func GetPemasukanFromID(db *mongo.Database, col string, _id primitive.ObjectID) (pemasukan model.Pemasukan, err error)

func GetPemasukanFromUser added in v0.0.13

func GetPemasukanFromUser(db *mongo.Database, col string, username string) (pemasukan []model.Pemasukan, err error)

func GetPengeluaranFromID

func GetPengeluaranFromID(db *mongo.Database, col string, _id primitive.ObjectID) (pengeluaran model.Pengeluaran, err error)

func GetPengeluaranFromUser added in v0.0.13

func GetPengeluaranFromUser(db *mongo.Database, col string, username string) (pengeluaran []model.Pengeluaran, err error)

func GetUserFromEmail

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

func GetUserFromID

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

func GetUserFromToken added in v0.0.14

func GetUserFromToken(db *mongo.Database, col string, _id primitive.ObjectID) (user model.User, err error)

func GetUserFromUsername added in v0.0.7

func GetUserFromUsername(db *mongo.Database, col string, username string) (user model.User, err error)

func HashPassword

func HashPassword(password string) (string, error)

func InsertManyDocsPemasukan

func InsertManyDocsPemasukan(db *mongo.Database, col string, pemasukan []model.Pemasukan) (insertedIDs []primitive.ObjectID, err error)

func InsertManyDocsPengeluaran

func InsertManyDocsPengeluaran(db *mongo.Database, col string, pengeluaran []model.Pengeluaran) (insertedIDs []primitive.ObjectID, err error)

func InsertOneDoc

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

func InsertPemasukan

func InsertPemasukan(db *mongo.Database, col string, pemasukanDoc model.Pemasukan, username string) (insertedID primitive.ObjectID, err error)

func InsertPengeluaran

func InsertPengeluaran(db *mongo.Database, col string, pengeluaranDoc model.Pengeluaran, username string) (insertedID primitive.ObjectID, err error)

func MongoConnect

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

func SendWhatsAppConfirmation added in v0.0.16

func SendWhatsAppConfirmation(username, phonenumber string) error

func SignIn

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

SIGN IN

func SignUp

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

SIGN UP

func UpdateOneDoc

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

func UpdatePemasukan

func UpdatePemasukan(db *mongo.Database, col string, doc model.Pemasukan) (docs model.Pemasukan, status bool, err error)

func UpdatePengeluaran

func UpdatePengeluaran(db *mongo.Database, col string, doc model.Pengeluaran) (docs model.Pengeluaran, status bool, err error)

func ValidatePhoneNumber added in v0.0.16

func ValidatePhoneNumber(phoneNumber string) (bool, error)

validate phone number

Types

This section is empty.

Jump to

Keyboard shortcuts

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