module

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Response model.Response
)

Functions

func Decode

func Decode(publicKey string, tokenstring string) (payload model.Payload, err error)

func DeleteOneDoc

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

func DeleteReservasi

func DeleteReservasi(idparam, iduser primitive.ObjectID, db *mongo.Database) error

func Encode

func Encode(id primitive.ObjectID, role, privateKey string) (string, error)

func GCFHandlerDeleteReservasi

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

func GCFHandlerGetAll

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

get all

func GCFHandlerGetAllReservasi

func GCFHandlerGetAllReservasi(MONGOCONNSTRINGENV, dbname string) string

func GCFHandlerGetReservasiFromID

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

func GCFHandlerGetTiket

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

func GCFHandlerInsertReservasi

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

Reservasi

func GCFHandlerLogin

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

login

func GCFHandlerUpdateReservasi

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

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

return struct

func GenerateKey

func GenerateKey() (privateKey, publicKey string)

func GetAllDocs

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

crud

func GetAllReservasi

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

func GetID

func GetID(r *http.Request) string

get id

func GetReservasiFromID

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

func GetUserLogin

func GetUserLogin(PASETOPUBLICKEYENV string, r *http.Request) (model.Payload, error)

get user login

func InsertOneDoc

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

func InsertReservasi

func InsertReservasi(iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.Reservasi) error

Reservasi

func LogIn

func LogIn(db *mongo.Database, insertedDoc model.User) (user model.User, 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 UpdateReservasi

func UpdateReservasi(idparam, iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.Reservasi) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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