Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceController ¶
type ServiceController struct { ServiceUsecase domain.ServiceUsecase Timeout time.Duration }
func (*ServiceController) Create ¶
func (s *ServiceController) Create(g *gin.Context)
Create handles the HTTP POST request for service creation. @Summary Create a service @Description Create a service @Tags Service @Accept json @Produce json @Param data body domain.ServiceCreateRequest true "ServiceCreateRequest" @Success 201 @Failure 400 {object} domain.HttpError @Failure 401 {object} domain.HttpError @Failure 409 {object} domain.HttpError @Failure 500 {object} domain.HttpError @Router /service/create [post]
@Security JWT
func (*ServiceController) List ¶
func (s *ServiceController) List(g *gin.Context)
List handles the HTTP GET request for service list. @Summary List services @Description List services @Tags Service @Accept json @Produce json @Param page query int false "Page number" default(0) @Success 200 {object} domain.ServiceListResponse @Failure 401 {object} domain.HttpError @Failure 500 {object} domain.HttpError @Router /service [get]
@Security JWT
func (*ServiceController) Remove ¶
func (s *ServiceController) Remove(g *gin.Context)
Remove handles the HTTP DELETE request for service removal. @Summary Remove a service @Description Remove a service @Tags Service @Accept json @Produce json @Param data body domain.ServiceRemoveRequest true "ServiceRemoveRequest" @Success 204 "No Content" @Failure 400 {object} domain.HttpError @Failure 401 {object} domain.HttpError @Failure 500 {object} domain.HttpError @Router /service/{id} [delete]
@Security JWT