module

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Responsed model.Credential
)

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func DeleteOneDoc

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

func DeleteRegistrasi

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

func DeleteReservasi

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

func GCFHandlerDeleteReservasi

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

func GCFHandlerGetAll

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

func GCFHandlerGetAllReservasi

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

func GCFHandlerInsertReservasi

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

reservasi

func GCFHandlerLogin

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

login

func GCFHandlerUpdateReservasi

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

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func GetAllDocs

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

crud

func GetAllRegistrasi

func GetAllRegistrasi(db *mongo.Database, col string) (registrasi []model.Registrasi, err error)

func GetAllReservasi

func GetAllReservasi(db *mongo.Database, col string) (reservasi []model.Reservasi, err error)

func GetUserFromUsername

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

func HashPassword

func HashPassword(password string) (string, error)

func InsertOneDoc

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

func InsertRegistrasi

func InsertRegistrasi(db *mongo.Database, col string, nama_lengkap string, no_telp string, ttl string, nim string, alamat string) (insertedID primitive.ObjectID, err error)

registrasi

func InsertReservasi

func InsertReservasi(db *mongo.Database, col string, nama string, no_telp string, ttl string, status string, keluhan string) (insertedID primitive.ObjectID, err error)

reservasi

func Login

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

login

func MongoConnect

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

func UpdateOneDoc

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

func UpdateRegistrasi

func UpdateRegistrasi(db *mongo.Database, doc model.Registrasi) (err error)

func UpdateReservasi

func UpdateReservasi(db *mongo.Database, doc model.Reservasi) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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