http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(db *sql.DB)

Types

type ErrorResponse

type ErrorResponse struct {
	FailedField string `json:"field"`
	Tag         string `json:"tag"`
	Value       string `json:"value"`
}

func ValidateTask

func ValidateTask(task models.TaskModel) (errors []*ErrorResponse)

type Response

type Response struct {
	Data       interface{} `json:"data"`
	Status     string      `json:"status"`
	Message    string      `json:"message"`
	ApiVersion string      `json:"api_version"`
}

type TaskController

type TaskController interface {
	All(ctx *fiber.Ctx) error
	GetById(ctx *fiber.Ctx) error
	Create(ctx *fiber.Ctx) error
	Update(ctx *fiber.Ctx) error
	Delete(ctx *fiber.Ctx) error
}

func NewTaskHttpController

func NewTaskHttpController(taskUseCase outer.TaskUseCase) TaskController

Jump to

Keyboard shortcuts

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