module

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func DeleteAntrianByID

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

func DeleteDokterByID added in v0.0.4

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

func DeletePasienByID added in v0.0.4

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

func DeletePoliklinikByID

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

func DeleteUserByID added in v0.0.11

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

func GetAllAntrian

func GetAllAntrian(db *mongo.Database, col string) (data []model.Antrian)

func GetAllDokter

func GetAllDokter(db *mongo.Database, col string) (data []model.Dokter)

func GetAllPasien added in v0.0.3

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

Get All Function

func GetAllPoliklinik

func GetAllPoliklinik(db *mongo.Database, col string) (data []model.Poliklinik)

func GetAllUser added in v0.0.8

func GetAllUser(db *mongo.Database, col string) (data []model.User)

func GetAntrianFromID

func GetAntrianFromID(_id primitive.ObjectID, db *mongo.Database, col string) (data model.Antrian, errs error)

func GetAntrianTerakhir added in v0.0.5

func GetAntrianTerakhir(db *mongo.Database) (int, error)

func GetDokterFromID

func GetDokterFromID(_id primitive.ObjectID, db *mongo.Database, col string) (data model.Dokter, errs error)

func GetPasienFromID added in v0.0.3

func GetPasienFromID(_id primitive.ObjectID, db *mongo.Database, col string) (data model.Pasien, errs error)

Get Function

func GetPoliklinikFromID

func GetPoliklinikFromID(_id primitive.ObjectID, db *mongo.Database, col string) (data model.Poliklinik, errs error)

func GetUserFromEmail added in v0.0.5

func GetUserFromEmail(email string, db *mongo.Database, col string) (result model.User, err error)

func GetUserFromID added in v0.0.8

func GetUserFromID(_id primitive.ObjectID, db *mongo.Database, col string) (data model.User, errs error)

func InsertAntrian

func InsertAntrian(db *mongo.Database, col string, poli model.Poliklinik, identitas_pasien model.Pasien, status_antrian string) (insertedID primitive.ObjectID, err error)

func InsertDokter

func InsertDokter(db *mongo.Database, col string, nama_dokter string, spesialisasi string) (insertedID primitive.ObjectID, err error)

func InsertOneDoc

func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})

func InsertPasien added in v0.0.3

func InsertPasien(db *mongo.Database, col string, nama_pasien string, nomor_ktp string, alamat string, nomor_telepon string, tanggal_lahir string, jenis_kelamin string) (insertedID primitive.ObjectID, err error)

Insert Function

func InsertPoliklinik

func InsertPoliklinik(db *mongo.Database, col string, kode_poliklinik string, nama_poliklinik string, deskripsi string, dokter model.Dokter) (insertedID primitive.ObjectID, err error)

func InsertUser added in v0.0.7

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

func LogIn added in v0.0.5

func LogIn(db *mongo.Database, col string, insertedDoc model.User) (userName string, err error)

func SignUp added in v0.0.5

func SignUp(db *mongo.Database, col string, insertedDoc model.User) (insertedID primitive.ObjectID, err error)

func UpdateAntrian

func UpdateAntrian(db *mongo.Database, col string, id primitive.ObjectID, poli model.Poliklinik, identitas_pasien model.Pasien, nomor_antrian int, status_antrian string) (err error)

func UpdateDokter

func UpdateDokter(db *mongo.Database, col string, id primitive.ObjectID, nama_dokter string, spesialisasi string) (err error)

func UpdatePasien added in v0.0.3

func UpdatePasien(db *mongo.Database, col string, id primitive.ObjectID, nama_pasien string, nomor_ktp string, alamat string, nomor_telepon string, tanggal_lahir string, jenis_kelamin string) (err error)

func UpdatePoliklinik

func UpdatePoliklinik(db *mongo.Database, col string, id primitive.ObjectID, kode_poliklinik string, nama_poliklinik string, deskripsi string, dokter model.Dokter) (err error)

func UpdateUser added in v0.0.11

func UpdateUser(db *mongo.Database, col string, id primitive.ObjectID, doc interface{}) (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