From 3360d106c0af9943e9c4eb19fa6d574395822d2a Mon Sep 17 00:00:00 2001 From: Zeni Kim Date: Mon, 16 Sep 2024 18:36:38 -0500 Subject: [PATCH] updates --- README.md | 6 +++--- go.mod | 13 +++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6ea30f6..0eee0df 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Cup is a skeleton project for the Goffee [Go](https://go.dev) framework made fo ## Main Features - Routing -- Middlewares +- Hooks - Data Validation - Databases ORM ([GORM](https://gorm.io/) integrated) - Emails @@ -64,8 +64,8 @@ The architecture is similar to `MVC`, where there is a routes file `./routes.go` ## The request journey: The first component that receive's the request in `Cup` is the `Router`, -then `Goffee` locates the matching [handler](https://gocondor.github.io/docs/handlers) of the request and it check's if there are any [middlewares](https://gocondor.github.io/docs/middlewares) to be executed either before or after the [handler](https://gocondor.github.io/docs/handlers), if so, it executes them in the right order, then at the final stage it returns the response to the user. -`Request -> Router -> Optional Middlewares -> Handler -> Optional Middlewares -> Response` +then `Goffee` locates the matching [handler](https://git.smarteching.com/goffee/docs/handlers) of the request and it check's if there are any [hooks](https://git.smarteching.com/goffee/docs/hooks) to be executed either before or after the [controller](https://git.smarteching.com/goffee/controllers), if so, it executes them in the right order, then at the final stage it returns the response to the user. +`Request -> Router -> Optional Hooks -> Controller -> Optional Hooks -> Response` ## Folder structure ```bash diff --git a/go.mod b/go.mod index 9572d69..2243d4d 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,16 @@ module git.smarteching.com/goffee/cup replace ( -git.smarteching.com/goffee/core => ../core - -git.smarteching.com/goffee/cup/config => ./config -git.smarteching.com/goffee/cup/handlers => ./handlers -git.smarteching.com/goffee/cup/middlewares => ./middlewares -git.smarteching.com/goffee/cup/models => ./models + git.smarteching.com/goffee/cup/config => ./config + git.smarteching.com/goffee/cup/handlers => ./handlers + git.smarteching.com/goffee/cup/middlewares => ./middlewares + git.smarteching.com/goffee/cup/models => ./models ) - go 1.23.1 require ( - git.smarteching.com/goffee/core v1.7.2 + git.smarteching.com/goffee/core v1.7.3 github.com/google/uuid v1.6.0 github.com/joho/godotenv v1.5.1 github.com/julienschmidt/httprouter v1.3.0