controller

package
v0.0.0-...-a29a6db Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDosenByID

func DeleteDosenByID(c *fiber.Ctx) error

DeleteDosenByID godoc @Summary Delete data dosen. @Description Hapus data dosen. @Tags Dosen @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 @Failure 400 @Failure 500 @Router /deldosen/{id} [delete]

func DeleteMahasiswaByID

func DeleteMahasiswaByID(c *fiber.Ctx) error

DeleteMahasiswaByID godoc @Summary Delete data mahasiswa. @Description Hapus data mahasiswa. @Tags Mahasiswa @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 @Failure 400 @Failure 500 @Router /delmahasiswa/{id} [delete]

func DeletePerwalianByID

func DeletePerwalianByID(c *fiber.Ctx) error

DeletePerwalianByID godoc @Summary Delete data perwalian. @Description Hapus data perwalian. @Tags Perwalian @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 @Failure 400 @Failure 500 @Router /del/{id} [delete]

func DeletePresensiByID

func DeletePresensiByID(c *fiber.Ctx) error

func DeleteRuanganByID

func DeleteRuanganByID(c *fiber.Ctx) error

DeleteRuanganByID godoc @Summary Delete data ruangan. @Description Hapus data ruangan. @Tags Ruangan @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 @Failure 400 @Failure 500 @Router /delruangan/{id} [delete]

func GetAllDosen

func GetAllDosen(c *fiber.Ctx) error

GetAllDosen godoc @Summary Get All Data Dosen. @Description Mengambil semua data dosen. @Tags Dosen @Accept json @Produce json @Success 200 {object} Dosen @Router /alldosen [get]

func GetAllDosenFromJabatan

func GetAllDosenFromJabatan(c *fiber.Ctx) error

func GetAllLocation

func GetAllLocation(c *fiber.Ctx) error

func GetAllLocationFromAlamat

func GetAllLocationFromAlamat(c *fiber.Ctx) error

func GetAllMahasiswa

func GetAllMahasiswa(c *fiber.Ctx) error

GetAllMahasiswa godoc @Summary Get All Data Mahasiswa. @Description Mengambil semua data mahasiswa. @Tags Mahasiswa @Accept json @Produce json @Success 200 {object} Mahasiswa @Router /allmahasiswa [get]

func GetAllMahasiswaFromNama

func GetAllMahasiswaFromNama(c *fiber.Ctx) error

func GetAllPerwalian

func GetAllPerwalian(c *fiber.Ctx) error

GetAllPerwalian godoc @Summary Get All Data Perwalian. @Description Mengambil semua data perwalian. @Tags Perwalian @Accept json @Produce json @Success 200 {object} Perwalian @Router /perwalian [get]

func GetAllPresensi

func GetAllPresensi(c *fiber.Ctx) error

func GetAllRuangan

func GetAllRuangan(c *fiber.Ctx) error

GetAllRuangan godoc @Summary Get All Data Ruangan. @Description Mengambil semua data ruangan. @Tags Ruangan @Accept json @Produce json @Success 200 {object} Ruangan @Router /allruangan [get]

func GetAllWaktu

func GetAllWaktu(c *fiber.Ctx) error

func GetDosenFromID

func GetDosenFromID(c *fiber.Ctx) error

GetDosenFromID godoc @Summary Get By ID Data Dosen. @Description Ambil per ID data dosen. @Tags Dosen @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 {object} Dosen @Failure 400 @Failure 404 @Failure 500 @Router /dosen/{id} [get]

func GetMahasiswaFromID

func GetMahasiswaFromID(c *fiber.Ctx) error

GetMahasiswaFromID godoc @Summary Get By ID Data Mahasiswa. @Description Ambil per ID data mahasiswa. @Tags Mahasiswa @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 {object} Mahasiswa @Failure 400 @Failure 404 @Failure 500 @Router /mahasiswa/{id} [get]

func GetPerwalianFromID

func GetPerwalianFromID(c *fiber.Ctx) error

GetPerwalianFromID godoc @Summary Get By ID Data Perwalian. @Description Ambil per ID data perwalian. @Tags Perwalian @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 {object} Perwalian @Failure 400 @Failure 404 @Failure 500 @Router /perwalian/{id} [get]

func GetPresensi

func GetPresensi(c *fiber.Ctx) error

func GetPresensiID

func GetPresensiID(c *fiber.Ctx) error

func GetRuangFromLokasiRuangan

func GetRuangFromLokasiRuangan(c *fiber.Ctx) error

func GetRuanganFromID

func GetRuanganFromID(c *fiber.Ctx) error

GetRuanganFromID godoc @Summary Get By ID Data Ruangan. @Description Ambil per ID data ruangan. @Tags Ruangan @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 {object} Ruangan @Failure 400 @Failure 404 @Failure 500 @Router /ruangan/{id} [get]

func GetWaktuFromJam

func GetWaktuFromJam(c *fiber.Ctx) error

func Home

func Home(c *fiber.Ctx) error

func Homepage

func Homepage(c *fiber.Ctx) error

func InsertData

func InsertData(c *fiber.Ctx) error

func InsertDataDosen

func InsertDataDosen(c *fiber.Ctx) error

InsertDataDosen godoc @Summary Insert data dosen. @Description Input data dosen. @Tags Dosen @Accept json @Produce json @Param request body Dosen true "Payload Body [RAW]" @Success 200 {object} Dosen @Failure 400 @Failure 500 @Router /insdosen [post]

func InsertDataLocation

func InsertDataLocation(c *fiber.Ctx) error

func InsertDataMahasiswa

func InsertDataMahasiswa(c *fiber.Ctx) error

InsertDataMahasiswa godoc @Summary Insert data mahasiswa. @Description Input data mahasiswa. @Tags Mahasiswa @Accept json @Produce json @Param request body Mahasiswa true "Payload Body [RAW]" @Success 200 {object} Mahasiswa @Failure 400 @Failure 500 @Router /insmahasiswa [post]

func InsertDataPerwalian

func InsertDataPerwalian(c *fiber.Ctx) error

InsertDataPerwalian godoc @Summary Insert data perwalian. @Description Input data perwalian. @Tags Perwalian @Accept json @Produce json @Param request body Perwalian true "Payload Body [RAW]" @Success 200 {object} Perwalian @Failure 400 @Failure 500 @Router /insperwalian [post]

func InsertDataRuangan

func InsertDataRuangan(c *fiber.Ctx) error

InsertDataRuangan godoc @Summary Insert data ruangan. @Description Input data ruangan. @Tags Ruangan @Accept json @Produce json @Param request body Ruangan true "Payload Body [RAW]" @Success 200 {object} Ruangan @Failure 400 @Failure 500 @Router /insruangan [post]

func InsertDosen

func InsertDosen(c *fiber.Ctx) error

func InsertLocation

func InsertLocation(c *fiber.Ctx) error

func InsertMahasiswa

func InsertMahasiswa(c *fiber.Ctx) error

func InsertPerwalian

func InsertPerwalian(c *fiber.Ctx) error

func InsertRuangan

func InsertRuangan(c *fiber.Ctx) error

func InsertWaktu

func InsertWaktu(c *fiber.Ctx) error

func LoginAdmin

func LoginAdmin(c *fiber.Ctx) error

func PostWhatsAuthRequest

func PostWhatsAuthRequest(c *fiber.Ctx) error

func UpdateData

func UpdateData(c *fiber.Ctx) error

func UpdateDataDosen

func UpdateDataDosen(c *fiber.Ctx) error

UpdateDataDosen godoc @Summary Update data dosen. @Description Ubah data dosen. @Tags Dosen @Accept json @Produce json @Param id path string true "Masukan ID" @Param request body Dosen true "Payload Body [RAW]" @Success 200 {object} Dosen @Failure 400 @Failure 500 @Router /upddosen/{id} [put]

func UpdateDataMahasiswa

func UpdateDataMahasiswa(c *fiber.Ctx) error

UpdateDataMahasiswa godoc @Summary Update data mahasiswa. @Description Ubah data mahasiswa. @Tags Mahasiswa @Accept json @Produce json @Param id path string true "Masukan ID" @Param request body Mahasiswa true "Payload Body [RAW]" @Success 200 {object} Mahasiswa @Failure 400 @Failure 500 @Router /updmahasiswa/{id} [put]

func UpdateDataPerwalian

func UpdateDataPerwalian(c *fiber.Ctx) error

UpdateDataPerwalian godoc @Summary Update data perwalian. @Description Ubah data perwalian. @Tags Perwalian @Accept json @Produce json @Param id path string true "Masukan ID" @Param request body Perwalian true "Payload Body [RAW]" @Success 200 {object} Perwalian @Failure 400 @Failure 500 @Router /update/{id} [put]

func UpdateDataRuangan

func UpdateDataRuangan(c *fiber.Ctx) error

UpdateDataRuangan godoc @Summary Update data ruangan. @Description Ubah data ruangan. @Tags Ruangan @Accept json @Produce json @Param id path string true "Masukan ID" @Param request body Ruangan true "Payload Body [RAW]" @Success 200 {object} Ruangan @Failure 400 @Failure 500 @Router /updruangan/{id} [put]

func WsWhatsAuthQR

func WsWhatsAuthQR(c *websocket.Conn)

Types

type Dosen

type Dosen struct {
	//ID          primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama    string `bson:"nama,omitempty" json:"nama,omitempty" example:"Indra Riksa"`
	Jabatan string `bson:"jabatan,omitempty" json:"jabatan,omitempty" example:"Wali Dosen 2c"`
}

type Geometry

type Geometry struct {
	Type        string      `json:"type" bson:"type"`
	Coordinates interface{} `json:"coordinates" bson:"coordinates"`
}

type JamKerja

type JamKerja struct {
	Durasi     int      `bson:"durasi,omitempty" json:"durasi,omitempty" example:"8"`
	Jam_masuk  string   `bson:"jam_masuk,omitempty" json:"jam_masuk,omitempty" example:"08:00"`
	Jam_keluar string   `bson:"jam_keluar,omitempty" json:"jam_keluar,omitempty" example:"16:00"`
	Gmt        int      `bson:"gmt,omitempty" json:"gmt,omitempty" example:"7"`
	Hari       []string `bson:"hari,omitempty" json:"hari,omitempty" example:"Senin,Selasa,Rabu,Kamis,Jumat,Sabtu,Minggu"`
	Shift      int      `bson:"shift,omitempty" json:"shift,omitempty" example:"2"`
	Piket_tim  string   `bson:"piket_tim,omitempty" json:"piket_tim,omitempty" example:"Piket Z"`
}

type Karyawan

type Karyawan struct {
	ID          primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty" example:"123456789"`
	Nama        string             `bson:"nama,omitempty" json:"nama,omitempty" example:"Tes Swagger"`
	PhoneNumber string             `bson:"phone_number,omitempty" json:"phone_number,omitempty" example:"08123456789"`
	Jabatan     string             `bson:"jabatan,omitempty" json:"jabatan,omitempty" example:"Anonymous"`
	Jam_kerja   []JamKerja         `bson:"jam_kerja,omitempty" json:"jam_kerja,omitempty"`
	Hari_kerja  []string           `bson:"hari_kerja,omitempty" json:"hari_kerja,omitempty" example:"Senin,Selasa,Rabu,Kamis,Jumat,Sabtu,Minggu"`
}

type Location

type Location struct {
	//ID             primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama_lokasi string `bson:"nama_lokasi,omitempty" json:"nama_lokasi,omitempty" example:"ULBI"`
	Alamat      string `bson:"alamat,omitempty" json:"alamat,omitempty" example:"ULBI"`
}

type Lokasi

type Lokasi struct {
	ID       primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama     string             `bson:"nama,omitempty" json:"nama,omitempty"`
	Batas    Geometry           `bson:"batas,omitempty" json:"batas,omitempty"`
	Kategori string             `bson:"kategori,omitempty" json:"kategori,omitempty"`
}

type Mahasiswa

type Mahasiswa struct {
	//ID           primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama        string `bson:"nama,omitempty" json:"nama,omitempty" example:"novi"`
	PhoneNumber string `bson:"phone_number,omitempty" json:"phone_number,omitempty" example:"896647373984"`
	Jurusan     string `bson:"jurusan,omitempty" json:"jurusan,omitempty" example:"Logistik"`
}

type Perwalian

type Perwalian struct {
	//ID           primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Time           Waktu     `bson:"time,omitempty" json:"time,omitempty"`
	WaliDosen      Dosen     `bson:"walidosen,omitempty" json:"walidosen,omitempty"`
	Biodata        Mahasiswa `bson:"biodata,omitempty" json:"biodata,omitempty"`
	Lokasi_ruangan Ruangan   `bson:"ruangan,omitempty" json:"ruangan,omitempty"`
}

type Presensi

type Presensi struct {
	ID           primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty" example:"123456789"`
	Longitude    float64            `bson:"longitude,omitempty" json:"longitude,omitempty" example:"123.11"`
	Latitude     float64            `bson:"latitude,omitempty" json:"latitude,omitempty" example:"123.11"`
	Location     string             `bson:"location,omitempty" json:"location,omitempty" example:"Bandung"`
	Phone_number string             `bson:"phone_number,omitempty" json:"phone_number,omitempty" example:"08123456789"`
	//Datetime     primitive.DateTime `bson:"datetime,omitempty" json:"datetime,omitempty"`
	Checkin string   `bson:"checkin,omitempty" json:"checkin,omitempty" example:"MASUK"`
	Biodata Karyawan `bson:"biodata,omitempty" json:"biodata,omitempty"`
}

type Ruangan

type Ruangan struct {
	//ID                primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Lokasi_ruangan string `bson:"lokasi_ruangan,omitempty" json:"lokasi_ruangan,omitempty" example:"Ruang 202"`
}

type Waktu

type Waktu struct {
	Jam     string `bson:"jam,omitempty" json:"jam,omitempty" example:"09.00"`
	Hari    string `bson:"hari,omitempty" json:"hari,omitempty" example:"Selasa"`
	Tanggal string `bson:"tanggal,omitempty" json:"tanggal,omitempty" example:"12 Mei 2023"`
}

Jump to

Keyboard shortcuts

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