module

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoInfo = atdb.DBInfo{
	DBString: MongoString,
	DBName:   "rumahsakit",
}
View Source
var MongoString string = os.Getenv("MONGOSTRING")

Functions

func DeletePasienByID

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

func GetAllPasien

func GetAllPasien(db *mongo.Database, col string) (data []model.Biodata)

func GetPasienByID

func GetPasienByID(_id primitive.ObjectID, db *mongo.Database, col string) (model.Biodata, error)

func InsertOneDoc

func InsertOneDoc(db string, collection string, doc interface{}) (insertedID interface{})

func InsertPasien

func InsertPasien(db *mongo.Database, col string, pasienName string, gender string, ttl string, status string, phonenumber string, alamat string, doctor model.Doctor, medicalRecord model.MedicalRecord) (insertedID primitive.ObjectID, err error)

func MongoConnect

func MongoConnect(dbname string) (db *mongo.Database)

func UpdatePasien

func UpdatePasien(ctx context.Context, db *mongo.Database, col string, _id primitive.ObjectID, pasienName string, gender string, ttl string, status string, phonenumber string, alamat string, doctor model.Doctor, medicalRecord model.MedicalRecord) (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