handlers

package
v0.0.0-...-9a4706f Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 11 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(app *echo.Echo, h *UserHandler)

Types

type UserHandler

type UserHandler struct {
	UserService UserService
}

func New

func New(us UserService) *UserHandler

func (*UserHandler) HandlerShowUserById

func (uh *UserHandler) HandlerShowUserById(c echo.Context) error

func (*UserHandler) HandlerShowUsers

func (uh *UserHandler) HandlerShowUsers(c echo.Context) error

func (*UserHandler) LearningHandler

func (uh *UserHandler) LearningHandler(c echo.Context) error

func (*UserHandler) View

func (uh *UserHandler) View(c echo.Context, cmp templ.Component) error

type UserService

type UserService interface {
	GetAllUsers() ([]services.User, error)
	GetUserById(id int) (services.User, error)
}

Jump to

Keyboard shortcuts

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