module

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func DeletePresensiByID added in v0.0.8

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

func GetAllPresensi

func GetAllPresensi(db *mongo.Database, col string) (data []model.Presensi)

func GetKaryawanFromPhoneNumber

func GetKaryawanFromPhoneNumber(phone_number string, db *mongo.Database, col string) (staf model.Presensi, errs error)

func GetPresensiFromID added in v0.0.6

func GetPresensiFromID(_id primitive.ObjectID, db *mongo.Database, col string) (presensi model.Presensi, errs error)

func InsertOneDoc

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

func InsertPresensi

func InsertPresensi(db *mongo.Database, col string, long float64, lat float64, lokasi string, phonenumber string, checkin string, biodata model.Karyawan) (insertedID primitive.ObjectID, err error)

func MongoConnect

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

func UpdatePresensi added in v0.0.8

func UpdatePresensi(db *mongo.Database, col string, id primitive.ObjectID, long float64, lat float64, lokasi string, phonenumber string, checkin string, biodata model.Karyawan) (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