Documentation
¶
Index ¶
- func DeleteMenuByID(c *fiber.Ctx) error
- func GetMenu(c *fiber.Ctx) error
- func GetMenuID(c *fiber.Ctx) error
- func Homepage(c *fiber.Ctx) error
- func InsertDataMenu(c *fiber.Ctx) error
- func Sink(c *fiber.Ctx) error
- func UpdateData(c *fiber.Ctx) error
- type BahanBaku
- type HTTPRequest
- type Kategori
- type Menu
- type ReqBahanBaku
- type ReqKategori
- type ReqMenu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteMenuByID ¶
func DeleteMenuByID(c *fiber.Ctx) error
DeleteMenuByID godoc @Summary Delete data menu. @Description Hapus data menu. @Tags Menu @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 @Failure 400 @Failure 500 @Router /delete/{id} [delete]
func GetMenu ¶
func GetMenu(c *fiber.Ctx) error
GetMenu godoc @Summary Get All Data Menu. @Description Mengambil semua data menu. @Tags Menu @Accept json @Produce json @Success 200 {object} Menu @Router /restoran [get]
func GetMenuID ¶
func GetMenuID(c *fiber.Ctx) error
GetMenuID godoc @Summary Get By ID Data Menu. @Description Ambil per ID data menu. @Tags Menu @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 {object} Menu @Failure 400 @Failure 404 @Failure 500 @Router /restoran/{id} [get]
func InsertDataMenu ¶
func InsertDataMenu(c *fiber.Ctx) error
InsertDataMenu godoc @Summary Insert data menu. @Description Input data menu. @Tags Menu @Accept json @Produce json @Param request body ReqMenu true "Payload Body [RAW]" @Success 200 {object} Menu @Failure 400 @Failure 500 @Router /insert [post]
func UpdateData ¶
func UpdateData(c *fiber.Ctx) error
UpdateData godoc @Summary Update data menu. @Description Ubah data menu. @Tags Menu @Accept json @Produce json @Param id path string true "Masukan ID" @Param request body ReqMenu true "Payload Body [RAW]" @Success 200 {object} Menu @Failure 400 @Failure 500 @Router /update/{id} [put]
Types ¶
type HTTPRequest ¶
type Menu ¶
type Menu struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty" example:"123456789"` Nama string `bson:"nama,omitempty" json:"nama,omitempty" example:"Nasi Goreng"` Harga float64 `bson:"harga,omitempty" json:"harga,omitempty" example:"15000"` Deskripsi string `bson:"deskripsi,omitempty" json:"deskripsi,omitempty" example:"Nasi goreng dengan campuran sayuran dan ayam"` Kategori Kategori `bson:"kategori,omitempty" json:"kategori,omitempty"` BahanBaku BahanBaku `bson:"bahan_baku,omitempty" json:"bahan_baku,omitempty"` }
type ReqBahanBaku ¶
type ReqKategori ¶
type ReqKategori struct {
Kategori string `bson:"kategori,omitempty" json:"kategori,omitempty" example:"Makanan"`
}
type ReqMenu ¶
type ReqMenu struct { Nama string `bson:"nama,omitempty" json:"nama,omitempty" example:"Nasi Goreng"` Harga float64 `bson:"harga,omitempty" json:"harga,omitempty" example:"15000"` Deskripsi string `bson:"deskripsi,omitempty" json:"deskripsi,omitempty" example:"Nasi goreng dengan campuran sayuran dan ayam"` Kategori ReqKategori `bson:"kategori,omitempty" json:"kategori,omitempty"` BahanBaku ReqBahanBaku `bson:"bahan_baku,omitempty" json:"bahan_baku,omitempty"` }