controller

package
v0.0.0-...-0e50a25 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderController

type ProviderController struct {
	ProviderService interfaces.IProviderService
	TaskService     interfaces.ITaskService
	HttpClient      *http_client.Fetcher
}

func NewProviderController

func NewProviderController(providerService interfaces.IProviderService, taskService interfaces.ITaskService, fetcher *http_client.Fetcher) *ProviderController

func (*ProviderController) AddProvider

func (pc *ProviderController) AddProvider(ctx *fiber.Ctx) error

@Summary Add a new provider @Description Add a new provider to add tasks @ID insert-provider @Accept json @Produce json @Param request body dto.AddProviderRequest true "Add provider request" @Success 201 {object} dto.SuccessResponse @Failure 400 {object} dto.ErrorResponse @Failure 500 {object} dto.ErrorResponse @Router /v1/provider [post]

func (*ProviderController) DeleteProviders

func (pc *ProviderController) DeleteProviders(ctx *fiber.Ctx) error

func (*ProviderController) GetProviderWithTasks

func (pc *ProviderController) GetProviderWithTasks(ctx *fiber.Ctx) error

func (*ProviderController) GetProviders

func (pc *ProviderController) GetProviders(ctx *fiber.Ctx) error

@Summary Get all the providers @Description Get all the providers from the database @ID get-providers @Produce json @Success 200 {object} []dto.Provider @Failure 400 {object} dto.ErrorResponse @Failure 500 {object} dto.ErrorResponse @Router /v1/providers [get]

func (*ProviderController) UpdateProvider

func (pc *ProviderController) UpdateProvider(ctx *fiber.Ctx) error

type TaskController

type TaskController struct {
	TaskService interfaces.ITaskService
}

func NewTaskController

func NewTaskController(taskService interfaces.ITaskService) *TaskController

func (*TaskController) AssignTask

func (tc *TaskController) AssignTask(ctx *fiber.Ctx) error

@Summary Assign tasks to developers @Description Assign tasks to developers @ID assign-tasks @Produce json @Success 200 {object} map[string]aggregate.DeveloperTask @Failure 400 {object} dto.ErrorResponse @Failure 500 {object} dto.ErrorResponse @Router /v1/task [post]

func (*TaskController) GetTasks

func (tc *TaskController) GetTasks(ctx *fiber.Ctx) error

@Summary Get all the tasks @Description Get all the task from the database @ID get-tasks @Produce json @Success 200 {object} []dto.Task @Failure 400 {object} dto.ErrorResponse @Failure 500 {object} dto.ErrorResponse @Router /v1/providers [get]

Jump to

Keyboard shortcuts

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