Documentation
¶
Overview ¶
Package gorest is a Go RESTful API starter kit with Gin, JWT, GORM (MySQL, PostgreSQL, SQLite), Redis, Mongo, 2FA, email verification, and password recovery.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package config reads all environment variables and sets up the base configuration for a functional application.
|
Package config reads all environment variables and sets up the base configuration for a functional application. |
|
Package controller contains all the controllers of the application.
|
Package controller contains all the controllers of the application. |
|
Package database handles connections to different types of databases.
|
Package database handles connections to different types of databases. |
|
migrate
Package migrate handles database schema migrations.
|
Package migrate handles database schema migrations. |
|
model
Package model contains all the models required for a functional database management system.
|
Package model contains all the models required for a functional database management system. |
|
Package main is the entry point of the example application.
|
Package main is the entry point of the example application. |
|
controller
Package controller contains all the controllers of the application.
|
Package controller contains all the controllers of the application. |
|
database/migrate
Package migrate handles schema migration for the example application.
|
Package migrate handles schema migration for the example application. |
|
database/model
Package model contains all the models required for a functional database management system.
|
Package model contains all the models required for a functional database management system. |
|
handler
Package handler contains the business logic of the example application.
|
Package handler contains the business logic of the example application. |
|
router
Package router contains all routes of the example application.
|
Package router contains all routes of the example application. |
|
example2
|
|
|
cmd/app
command
Package main is the entry point of the example2 application.
|
Package main is the entry point of the example2 application. |
|
internal/database/migrate
Package migrate handles database schema migration for the example2 application.
|
Package migrate handles database schema migration for the example2 application. |
|
internal/database/model
Package model contains all the models required for a functional database management system.
|
Package model contains all the models required for a functional database management system. |
|
internal/handler
Package handler provides HTTP handler implementations for the application's API endpoints.
|
Package handler provides HTTP handler implementations for the application's API endpoints. |
|
internal/repo
Package repo provides data access and persistence logic for the application's models.
|
Package repo provides data access and persistence logic for the application's models. |
|
internal/router
Package router contains all routes of the example2 application.
|
Package router contains all routes of the example2 application. |
|
internal/service
Package service provides business logic and application services for the API.
|
Package service provides business logic and application services for the API. |
|
Package handler contains business logic invoked by controllers.
|
Package handler contains business logic invoked by controllers. |
|
Package lib provides additional functionalities to the application:
|
Package lib provides additional functionalities to the application: |
|
middleware
Package middleware contains:
|
Package middleware contains: |
|
renderer
Package renderer uses a template engine to render and serve HTML pages.
|
Package renderer uses a template engine to render and serve HTML pages. |
|
server
Package server provides utilities for managing HTTP server lifecycle operations.
|
Package server provides utilities for managing HTTP server lifecycle operations. |
|
Package service contains common functions used by the whole application.
|
Package service contains common functions used by the whole application. |
Click to show internal directories.
Click to hide internal directories.