backend

package module
v0.0.0-...-5413818 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoString string = os.Getenv("MONGOSTRING")

Functions

func InsertDosen

func InsertDosen(nama_dosen string, npm string) (InsertedID interface{})

func InsertJam_matkul

func InsertJam_matkul(id_matkul string, jam_masuk string, jam_keluar string) (InsertedID interface{})

func InsertMahasiswa

func InsertMahasiswa(nama string, phone_number string, prodi string, kelas string) (InsertedID interface{})

func InsertMatakuliah

func InsertMatakuliah(nama_matkul string, id_dosen string) (InsertedID interface{})

func InsertOneDoc

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

func InsertPresensi

func InsertPresensi(checkin string, id_mhs string) (InsertedID interface{})

func MongoConnect

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

Types

type Dosen

type Dosen struct {
	ID         primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama_dosen string             `bson:"nama_dosen,omitempty" json:"nama_dosen,omitempty"`
	Npm        string             `bson:"npm,omitempty" json:"npm,omitempty"`
}

type Jam_matkul

type Jam_matkul struct {
	ID         primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	ID_matkul  string             `bson:"ID_matkul,omitempty" json:"ID_matkul,omitempty"`
	Jam_masuk  string             `bson:"Jam_masuk,omitempty" json:"Jam_masuk,omitempty"`
	Jam_keluar string             `bson:"Jam_keluar,omitempty" json:"Jam_keluar,omitempty"`
}

type Mahasiswa

type Mahasiswa struct {
	ID           primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama         string             `bson:"nama,omitempty" json:"nama,omitempty"`
	Phone_number string             `bson:"phone_number,omitempty" json:"phone_number,omitempty"`
	Prodi        string             `bson:"Prodi,omitempty" json:"Prodi,omitempty"`
	Kelas        string             `bson:"Kelas,omitempty" json:"Kelas,omitempty"`
}

func GetMahasiswaFromPhone

func GetMahasiswaFromPhone(phone_number string) (staf Mahasiswa)

type Matakuliah

type Matakuliah struct {
	ID          primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama_matkul string             `bson:"Nama_matkul,omitempty" json:"Nama_matkul,omitempty"`
	ID_dosen    string             `bson:"Dosen,omitempty" json:"Dosen,omitempty"`
}

type Presensi

type Presensi struct {
	ID       primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Datetime primitive.DateTime `bson:"datetime,omitempty" json:"datetime,omitempty"`
	Checkin  string             `bson:"checkin,omitempty" json:"checkin,omitempty"`
	ID_mhs   string             `bson:"ID_mhs,omitempty" json:"ID_mhs,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL