handlers

package
v0.0.0-...-8442f8b Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomHTTPErrorHandler

func CustomHTTPErrorHandler(err error, c echo.Context)

func SetupRoutes

func SetupRoutes(e *echo.Echo, ah *AuthHandler, th *TaskHandler)

Types

type AuthHandler

type AuthHandler struct {
	UserServices AuthService
}

func NewAuthHandler

func NewAuthHandler(us AuthService) *AuthHandler

type AuthService

type AuthService interface {
	CreateUser(u services.User) error
	CheckEmail(email string) (services.User, error)
}

type TaskHandler

type TaskHandler struct {
	TodoServices TaskService
}

func NewTaskHandler

func NewTaskHandler(ts TaskService) *TaskHandler

type TaskService

type TaskService interface {
	CreateTodo(t services.Todo) (services.Todo, error)
	GetAllTodos(createdBy int) ([]services.Todo, error)
	GetTodoById(t services.Todo) (services.Todo, error)
	UpdateTodo(t services.Todo) (services.Todo, error)
	DeleteTodo(t services.Todo) error
}

Jump to

Keyboard shortcuts

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