Documentation
¶
Index ¶
- func DeleteOneDoc(db *mongo.Database, col string, filter bson.M) (err error)
- func GCFReturnStruct(DataStuct any) string
- func GetAllData(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}
- func InsertDataProduk(Mongoenv, dbname string, r *http.Request) string
- func InsertOneDoc(db *mongo.Database, col string, docs interface{}) (insertedID primitive.ObjectID, err error)
- func InsertProduk(db *mongo.Database, col string, produkdata Produk) (insertedID primitive.ObjectID, err error)
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- func UpdateOneDoc(db *mongo.Database, col string, filter, update interface{}) (err error)
- type Credential
- type Produk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GCFReturnStruct ¶
func GetAllData ¶
func GetAllDocs ¶
func InsertOneDoc ¶
func InsertProduk ¶
func SetConnection ¶
Types ¶
type Credential ¶
type Produk ¶
type Produk struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` Nama string `bson:"nama,omitempty" json:"nama,omitempty"` Harga string `bson:"harga,omitempty" json:"harga,omitempty"` Deskripsi string `bson:"deskripsi,omitempty" json:"deskripsi,omitempty"` Stok string `bson:"stok,omitempty" json:"stok,omitempty"` Image_URL string `bson:"image_url,omitempty" json:"image_url,omitempty"` }
Click to show internal directories.
Click to hide internal directories.