Documentation
¶
Index ¶
- func CallService(_ context.Context, code int) error
- func CreateUser(svc *service.Service) echo.HandlerFunc
- func EmitError(c echo.Context) error
- func ErrorHandler(err error, ctx echo.Context)
- func GetUser(svc *service.Service) echo.HandlerFunc
- func HealthCheck(db *repository.DummyDB) echokit.HealthCheckFunc
- func LongOperation(ctx echo.Context) error
- func PanicGuaranteed(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallService ¶
CallService - simulate service / repo layer error.
func CreateUser ¶
func CreateUser(svc *service.Service) echo.HandlerFunc
CreateUser for create single user based on json body.
func ErrorHandler ¶
ErrorHandler is fallback exception handler when controller / handler returning error instead of ctx.JSON / echo.NewHTTPError.
func GetUser ¶
func GetUser(svc *service.Service) echo.HandlerFunc
GetUser find user by specific id GET /users/:id.
func HealthCheck ¶
func HealthCheck(db *repository.DummyDB) echokit.HealthCheckFunc
HealthCheck health check handler.
func LongOperation ¶
LongOperation simulates long query / api call.
func PanicGuaranteed ¶
PanicGuaranteed demonstrates what could go wrong during executing handler.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.