handlers

package
v0.0.0-...-8e66b6a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 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 RouteNotFoundHandler

func RouteNotFoundHandler(c echo.Context) error

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