Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func CreateAbout(mongoconn *mongo.Database, collection string, aboutdata About) interface{}
- func CreateCatalog(mongoconn *mongo.Database, collection string, catalogdata Catalog) interface{}
- func CreateContact(mongoconn *mongo.Database, collection string, contactdata Contact) interface{}
- func CreateHotelResto(mongoconn *mongo.Database, collection string, hotelrestodata HotelResto) interface{}
- func CreateNewCatalog(mongoconn *mongo.Database, collection string, catalogdata Catalog) interface{}
- func CreateNewUserRole(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateTour(mongoconn *mongo.Database, collection string, tourdata Tour) interface{}
- func CreateUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateUserAndAddToken(privateKeyEnv string, mongoconn *mongo.Database, collection string, ...) error
- func DeleteAbout(mongoconn *mongo.Database, collection string, aboutdata About) interface{}
- func DeleteCatalog(mongoconn *mongo.Database, collection string, catalogdata Catalog) interface{}
- func DeleteContact(mongoconn *mongo.Database, collection string, contactdata Contact) interface{}
- func DeleteHotelResto(mongoconn *mongo.Database, collection string, hotelrestodata HotelResto) interface{}
- func DeleteTour(mongoconn *mongo.Database, collection string, tourdata Tour) interface{}
- func DeleteUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func Encode(id primitive.ObjectID, role, privateKey string) (string, error)
- func GCFCreateAbout(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateCatalog(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateContact(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateHotelResto(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateTour(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteAbout(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteCatalog(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteContact(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteHotelResto(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteTour(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 GCFGetAllAbout(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllCatalog(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllCatalogID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllContact(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllContactID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllHotelResto(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllHotelRestoID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllTour(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllTourID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginTest(username, password, MONGOCONNSTRINGENV, dbname, collectionname string) bool
- func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFReturnStruct(DataStuct any) string
- func GCFUpdateAbout(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdateCatalog(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdateContact(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdateHotelResto(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdateTour(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GFCPostHandlerUser(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GenerateKey() (privateKey, publicKey string)
- func GetConnectionMongo(MongoString, dbname string) *mongo.Database
- func GetID(r *http.Request) string
- func HashPassword(password 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, username, role, password string) (InsertedID interface{})
- func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool
- func Login(Privatekey, MongoEnv, dbname, Colname string, r *http.Request) string
- func MongoConnect(MongoString, dbname string) *mongo.Database
- 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
- func UpdatedAbout(mongoconn *mongo.Database, collection string, filter bson.M, aboutdata About) interface{}
- func UpdatedCatalog(mongoconn *mongo.Database, collection string, filter bson.M, ...) interface{}
- func UpdatedContact(mongoconn *mongo.Database, collection string, filter bson.M, ...) interface{}
- func UpdatedHotelResto(mongoconn *mongo.Database, collection string, filter bson.M, ...) interface{}
- func UpdatedTour(mongoconn *mongo.Database, collection string, filter bson.M, tourdata Tour) interface{}
- type About
- type Catalog
- type Contact
- type Credential
- type HotelResto
- type Payload
- type Response
- type Tour
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶ added in v0.0.2
func CreateAbout ¶ added in v0.0.7
func CreateCatalog ¶ added in v0.0.6
catalog function
func CreateContact ¶ added in v0.0.7
func CreateHotelResto ¶ added in v0.0.7
func CreateHotelResto(mongoconn *mongo.Database, collection string, hotelrestodata HotelResto) interface{}
func CreateNewCatalog ¶ added in v0.0.6
func CreateNewCatalog(mongoconn *mongo.Database, collection string, catalogdata Catalog) interface{}
catalog
func CreateNewUserRole ¶ added in v0.0.2
func CreateTour ¶ added in v0.0.7
func CreateUser ¶ added in v0.0.2
crud paseto
func CreateUserAndAddToken ¶ added in v0.0.2
func DeleteAbout ¶ added in v0.0.7
func DeleteCatalog ¶ added in v0.0.6
func DeleteContact ¶ added in v0.0.7
func DeleteHotelResto ¶ added in v0.0.7
func DeleteHotelResto(mongoconn *mongo.Database, collection string, hotelrestodata HotelResto) interface{}
func DeleteTour ¶ added in v0.0.7
func DeleteUser ¶ added in v0.0.2
func GCFCreateAbout ¶ added in v0.0.7
about post
func GCFCreateCatalog ¶ added in v0.0.6
catalog post
func GCFCreateContact ¶ added in v0.0.7
contact post
func GCFCreateHandler ¶ added in v0.0.2
func GCFCreateHotelResto ¶ added in v0.0.7
hotelresto post
func GCFCreateTour ¶ added in v0.0.7
tour post
func GCFDeleteAbout ¶ added in v0.0.7
delete about
func GCFDeleteCatalog ¶ added in v0.0.6
delete catalog
func GCFDeleteContact ¶ added in v0.0.7
delete contact
func GCFDeleteHandler ¶ added in v0.0.2
func GCFDeleteHotelResto ¶ added in v0.0.7
delete hotelresto
func GCFDeleteTour ¶ added in v0.0.7
delete tour
func GCFFindUserByID ¶ added in v0.0.2
func GCFFindUserByName ¶ added in v0.0.2
func GCFGetAllAbout ¶ added in v0.0.7
get all about
func GCFGetAllCatalog ¶ added in v0.0.6
get all catalog
func GCFGetAllCatalogID ¶ added in v0.0.7
get all catalog by id
func GCFGetAllContact ¶ added in v0.0.7
get all contact
func GCFGetAllContactID ¶ added in v0.0.7
get all contact by id
func GCFGetAllHotelResto ¶ added in v0.0.7
get all hotelresto
func GCFGetAllHotelRestoID ¶ added in v0.0.7
func GCFGetAllHotelRestoID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
get all hotelresto by id
func GCFGetAllTour ¶ added in v0.0.7
get all tour
func GCFGetAllTourID ¶ added in v0.0.7
get all tour by id
func GCFLoginTest ¶ added in v0.0.2
func GCFPostHandler ¶ added in v0.0.2
func GCFUpdateAbout ¶ added in v0.0.7
update about
func GCFUpdateCatalog ¶ added in v0.0.6
update catalog
func GCFUpdateContact ¶ added in v0.0.7
update contact
func GCFUpdateHandler ¶ added in v0.0.2
func GCFUpdateHotelResto ¶ added in v0.0.7
update hotelresto
func GCFUpdateTour ¶ added in v0.0.7
update tour
func GFCPostHandlerUser ¶ added in v0.0.2
func GenerateKey ¶ added in v0.0.8
func GenerateKey() (privateKey, publicKey string)
func GetConnectionMongo ¶ added in v0.0.3
func HashPassword ¶ added in v0.0.2
func InsertOneDoc ¶
func InsertUser ¶ added in v0.0.4
func InsertUserdata ¶
func IsPasswordValid ¶ added in v0.0.2
func MongoConnect ¶ added in v0.0.8
mongo
func ReplaceOneDoc ¶ added in v0.0.2
func ReturnStringStruct ¶
func SetConnection ¶ added in v0.0.2
func UpdatedAbout ¶ added in v0.0.7
func UpdatedCatalog ¶ added in v0.0.6
func UpdatedContact ¶ added in v0.0.7
func UpdatedHotelResto ¶ added in v0.0.7
Types ¶
type About ¶ added in v0.0.7
type About struct { ID int `json:"id" bson:"id"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Image string `json:"image" bson:"image"` Status bool `json:"status" bson:"status"` }
func GetAllAbout ¶ added in v0.0.7
type Catalog ¶ added in v0.0.6
type Catalog struct { ID primitive.ObjectID `bson:"_id,omitempty" ` Nomorid int `json:"nomorid" bson:"nomorid"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Image string `json:"image" bson:"image"` Status bool `json:"status" bson:"status"` }
func GetAllCatalog ¶ added in v0.0.6
type Contact ¶ added in v0.0.7
type Contact struct { ID int `json:"id" bson:"id"` Name string `json:"title" bson:"title"` Subject string `json:"description" bson:"description"` Alamat string `json:"alamat" bson:"alamat"` Website string `json:"website" bson:"website"` Message string `json:"image" bson:"image"` Email string `json:"email" bson:"email"` Phone string `json:"phone" bson:"phone"` Status bool `json:"status" bson:"status"` }
func GetAllContact ¶ added in v0.0.7
type Credential ¶
type HotelResto ¶ added in v0.0.7
type HotelResto struct { ID int `json:"id" bson:"id"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Cari string `json:"cari" bson:"cari"` Tanggal string `json:"tanggal" bson:"tanggal"` Image string `json:"image" bson:"image"` Harga int `json:"harga" bson:"harga"` Catalog []Catalog `json:"catalog" bson:"catalog"` Rating string `json:"rating" bson:"rating"` Status bool `json:"status" bson:"status"` }
func GetAllHotelResto ¶ added in v0.0.7
func GetAllHotelResto(mongoconn *mongo.Database, collection string) []HotelResto
func GetAllHotelRestoId ¶ added in v0.0.7
func GetAllHotelRestoId(mongoconn *mongo.Database, collection string, hotelrestodata HotelResto) []HotelResto
type Payload ¶
type Payload struct { Id primitive.ObjectID `json:"id"` Role string `json:"role"` Exp time.Time `json:"exp"` Iat time.Time `json:"iat"` Nbf time.Time `json:"nbf"` }
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 ¶ added in v0.0.2
type Tour ¶ added in v0.0.7
type Tour struct { ID int `json:"id" bson:"id"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Cari string `json:"cari" bson:"cari"` Tanggal string `json:"tanggal" bson:"tanggal"` Image string `json:"image" bson:"image"` Harga int `json:"harga" bson:"harga"` Catalog []Catalog `json:"catalog" bson:"catalog"` Rating string `json:"rating" bson:"rating"` Status bool `json:"status" bson:"status"` }
func GetAllTour ¶ added in v0.0.7
type User ¶
type User struct { Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` Role string `json:"role,omitempty" bson:"role,omitempty"` Email string `bson:"email,omitempty" json:"email,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.