2024-05-29 13:02:06 +00:00
|
|
|
package privilege_internal
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gofiber/fiber/v2"
|
2024-05-29 14:31:33 +00:00
|
|
|
"go.uber.org/zap"
|
|
|
|
"hub_admin_backend_service/internal/repository/privilege"
|
2024-05-29 13:02:06 +00:00
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Deps struct {
|
2024-05-29 14:31:33 +00:00
|
|
|
Repo *privilege.Privilege
|
|
|
|
Logger *zap.Logger
|
2024-05-29 13:02:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type PrivilegeInternal struct {
|
2024-05-29 14:31:33 +00:00
|
|
|
repo *privilege.Privilege
|
|
|
|
logger *zap.Logger
|
2024-05-29 13:02:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewPrivilegeInternal(deps Deps) *PrivilegeInternal {
|
2024-05-29 14:31:33 +00:00
|
|
|
return &PrivilegeInternal{
|
|
|
|
repo: deps.Repo,
|
|
|
|
logger: deps.Logger,
|
|
|
|
}
|
2024-05-29 13:02:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) Get(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusOK)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) Create(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusCreated)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) Update(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusOK)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) Delete(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusNoContent)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) GetByID(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusOK)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) GetByService(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusOK)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) PostMany(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusCreated)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) UpdateMany(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusOK)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PrivilegeInternal) Restore(c *fiber.Ctx) error {
|
|
|
|
return c.SendStatus(http.StatusOK)
|
|
|
|
}
|