Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
TaskHandler
}
type Processor ¶
type Processor interface { // FindValues finds min, max, median, average, max increasing sequential and max decreasing sequential of the numbers in the file. // // If file is not valid, returns error. // If file is empty, returns error. // If file is valid, returns min, max, median, average, max increasing sequential and max decreasing sequential of the numbers. FindValues(form *multipart.Form) (*model.TaskResult, error) }
type ServiceInterface ¶
type ServiceInterface interface { Processor }
type TaskHandler ¶
type TaskHandler struct {
// contains filtered or unexported fields
}
func (*TaskHandler) FindValues ¶
func (th *TaskHandler) FindValues(c *fiber.Ctx) error
@Summary Find values @Description Web service that receives a `.txt` file with numbers and returns `min`, `max`, `median`, `average`, `max increasing sequential`, `max decreasing sequential` and `execution time` of the numbers. @Tags Task @Accept multipart/form-data @Produce json @Param file formData file true "Please insert your `.txt` file here" @Success 200 {object} model.Response @Failure 400 {object} model.Response @Failure 500 {object} model.Response @Router /task [post].
Click to show internal directories.
Click to hide internal directories.