Documentation
¶
Index ¶
- Variables
- func DeleteGadgetID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func GetDataGadget(db *mongo.Database, col string) (data []model.Gadget)
- func GetDataReview(db *mongo.Database, col string) (data []model.Review)
- func GetGadgetByID(_id primitive.ObjectID, db *mongo.Database, col string) (gadgets model.Gadget, errs error)
- func InsertGadget(db *mongo.Database, col string, nama string, merk string, harga float64, ...) (insertedID primitive.ObjectID, err error)
- func InsertOneDoc(db string, collection string, doc interface{}) (insertedID interface{})
- func InsertReview(db *mongo.Database, col string, rating int, review string) (insertedID primitive.ObjectID, err error)
- func MongoConnect(dbname string) (db *mongo.Database)
- func UpdateGadget(db *mongo.Database, col string, id primitive.ObjectID, nama string, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoConn = atdb.MongoConnect(MongoInfo)
View Source
var MongoInfo = atdb.DBInfo{ DBString: MongoString, DBName: "tb2024", }
View Source
var MongoString string = os.Getenv("MONGOSTRING")
Functions ¶
func DeleteGadgetID ¶
func GetGadgetByID ¶ added in v0.0.3
func InsertGadget ¶
func InsertOneDoc ¶
func InsertReview ¶
func MongoConnect ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.