forked from goffee/cup
updates
This commit is contained in:
parent
a756cd418d
commit
3360d106c0
2 changed files with 8 additions and 11 deletions
|
@ -6,7 +6,7 @@ Cup is a skeleton project for the Goffee [Go](https://go.dev) framework made fo
|
||||||
|
|
||||||
## Main Features
|
## Main Features
|
||||||
- Routing
|
- Routing
|
||||||
- Middlewares
|
- Hooks
|
||||||
- Data Validation
|
- Data Validation
|
||||||
- Databases ORM ([GORM](https://gorm.io/) integrated)
|
- Databases ORM ([GORM](https://gorm.io/) integrated)
|
||||||
- Emails
|
- Emails
|
||||||
|
@ -64,8 +64,8 @@ The architecture is similar to `MVC`, where there is a routes file `./routes.go`
|
||||||
|
|
||||||
## The request journey:
|
## The request journey:
|
||||||
The first component that receive's the request in `Cup` is the `Router`,
|
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.
|
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 Middlewares -> Handler -> Optional Middlewares -> Response`
|
`Request -> Router -> Optional Hooks -> Controller -> Optional Hooks -> Response`
|
||||||
|
|
||||||
## Folder structure
|
## Folder structure
|
||||||
```bash
|
```bash
|
||||||
|
|
5
go.mod
5
go.mod
|
@ -1,19 +1,16 @@
|
||||||
module git.smarteching.com/goffee/cup
|
module git.smarteching.com/goffee/cup
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
git.smarteching.com/goffee/core => ../core
|
|
||||||
|
|
||||||
git.smarteching.com/goffee/cup/config => ./config
|
git.smarteching.com/goffee/cup/config => ./config
|
||||||
git.smarteching.com/goffee/cup/handlers => ./handlers
|
git.smarteching.com/goffee/cup/handlers => ./handlers
|
||||||
git.smarteching.com/goffee/cup/middlewares => ./middlewares
|
git.smarteching.com/goffee/cup/middlewares => ./middlewares
|
||||||
git.smarteching.com/goffee/cup/models => ./models
|
git.smarteching.com/goffee/cup/models => ./models
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
go 1.23.1
|
go 1.23.1
|
||||||
|
|
||||||
require (
|
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/google/uuid v1.6.0
|
||||||
github.com/joho/godotenv v1.5.1
|
github.com/joho/godotenv v1.5.1
|
||||||
github.com/julienschmidt/httprouter v1.3.0
|
github.com/julienschmidt/httprouter v1.3.0
|
||||||
|
|
Loading…
Reference in a new issue