Documentation ¶
Index ¶
- Variables
- func DeleteDosenWaliByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func DeleteMahasiswaByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func DeleteMonitoringByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func DeleteOrangTuaByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func DeleteTemaByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func GetAllDosenWali(db *mongo.Database, col string) (data []model.DosenWali)
- func GetAllMahasiswa(db *mongo.Database, col string) (data []model.Mahasiswa)
- func GetAllMonitoring(db *mongo.Database, col string) (data []model.Monitoring)
- func GetAllOrangTua(db *mongo.Database, col string) (data []model.OrangTua)
- func GetAllTema(db *mongo.Database, col string) (data []model.Tema)
- func GetDosenWaliFromID(_id primitive.ObjectID, db *mongo.Database, col string) (dos model.Monitoring, errs error)
- func GetMahasiswaFromID(_id primitive.ObjectID, db *mongo.Database, col string) (mhs model.Monitoring, errs error)
- func GetMonitoringFromID(_id primitive.ObjectID, db *mongo.Database, col string) (adm model.Monitoring, errs error)
- func GetOrangTuaFromID(_id primitive.ObjectID, db *mongo.Database, col string) (ot model.Monitoring, errs error)
- func GetTemaFromID(_id primitive.ObjectID, db *mongo.Database, col string) (mkl model.Monitoring, errs error)
- func GetUserFromEmail(email string, db *mongo.Database, col string) (result model.User, err error)
- func InsertDosenWali(db *mongo.Database, col string, nama_dosen string, alamat string, ...) (insertedID primitive.ObjectID, err error)
- func InsertMahasiswa(db *mongo.Database, col string, nama_mahasiswa string, npm int, ...) (insertedID primitive.ObjectID, err error)
- func InsertMonitoring(db *mongo.Database, col string, orang_tua model.OrangTua, tema model.Tema, ...) (insertedID primitive.ObjectID, err error)
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertOneDoc2(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertOrangTua(db *mongo.Database, col string, nama_orangtua string, phone_number string, ...) (insertedID primitive.ObjectID, err error)
- func InsertTema(db *mongo.Database, col string, nama_tema string) (insertedID primitive.ObjectID, err error)
- func InsertUser(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)
- func LogIn(db *mongo.Database, col string, insertedDoc2 model.User) (userName string, err error)
- func SignUp(db *mongo.Database, col string, insertedDoc2 model.User) (insertedID primitive.ObjectID, err error)
- func UpdateDosenWali(db *mongo.Database, col string, id primitive.ObjectID, nama_dosen string, ...) (err error)
- func UpdateMahasiswa(db *mongo.Database, col string, id primitive.ObjectID, nama_mahasiswa string, ...) (err error)
- func UpdateMonitoring(db *mongo.Database, col string, id primitive.ObjectID, ...) (err error)
- func UpdateOrangTua(db *mongo.Database, col string, id primitive.ObjectID, nama_orangtua string, ...) (err error)
- func UpdateTema(db *mongo.Database, col string, id primitive.ObjectID, nama_tema string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoConn = atdb.MongoConnect(MongoInfo)
View Source
var MongoInfo = atdb.DBInfo{ DBString: MongoString, DBName: "monitoring_db", }
View Source
var MongoString string = os.Getenv("MONGOSTRING")
Functions ¶
func DeleteDosenWaliByID ¶ added in v0.0.16
func DeleteMahasiswaByID ¶ added in v0.0.16
func DeleteMonitoringByID ¶ added in v0.0.15
func DeleteOrangTuaByID ¶ added in v0.0.16
func DeleteTemaByID ¶ added in v0.0.16
func GetAllDosenWali ¶ added in v0.0.3
func GetAllMahasiswa ¶ added in v0.0.2
func GetAllMonitoring ¶ added in v0.0.2
func GetAllMonitoring(db *mongo.Database, col string) (data []model.Monitoring)
func GetAllOrangTua ¶ added in v0.0.2
func GetAllTema ¶ added in v0.0.2
func GetDosenWaliFromID ¶ added in v0.0.15
func GetMahasiswaFromID ¶ added in v0.0.15
func GetMonitoringFromID ¶ added in v0.0.15
func GetMonitoringFromID(_id primitive.ObjectID, db *mongo.Database, col string) (adm model.Monitoring, errs error)
FUNCTION GET MONITORING FROM ID
func GetOrangTuaFromID ¶ added in v0.0.15
func GetTemaFromID ¶ added in v0.0.15
func GetUserFromEmail ¶ added in v0.0.17
func InsertDosenWali ¶ added in v0.0.3
func InsertMahasiswa ¶ added in v0.0.2
func InsertMonitoring ¶ added in v0.0.2
func InsertMonitoring(db *mongo.Database, col string, orang_tua model.OrangTua, tema model.Tema, dosen model.DosenWali, tanggal string, hari string) (insertedID primitive.ObjectID, err error)
func InsertMonitoring(db *mongo.Database, col string, orang_tua model.OrangTua, tema model.Tema, dosen model.DosenWali, tanggal string, hari string) (insertedID primitive.ObjectID, err error) { mmonitoring := bson.M{ monitoring.OrangTua = orang_tua monitoring.Tema = tema monitoring.Dosen = dosen monitoring.Tanggal = tanggal monitoring.Hari = hari result, err := db.Collection(col).InsertOne(context.Background(), monitoring) if err != nil { fmt.Printf("InsertMonitoring: %v\n", err) return } insertedID = result.InsertedID.(primitive.ObjectID) return insertedID, nil }
func InsertOneDoc ¶
func InsertOneDoc2 ¶ added in v0.0.17
func InsertOrangTua ¶
func InsertTema ¶ added in v0.0.2
func InsertUser ¶ added in v0.0.17
func UpdateDosenWali ¶ added in v0.0.16
func UpdateMahasiswa ¶ added in v0.0.16
func UpdateMonitoring ¶ added in v0.0.15
func UpdateOrangTua ¶ added in v0.0.16
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.