Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Controllers will handle all Go-Web controller // Here is where you've to register your custom controller // If you create a new controller with Alfred it will be auto-registered Controllers = register.ControllerRegister{ List: []interface{}{ &controller.UserController{}, &controller.AuthController{}, &controller.HomeController{}, }, } // Models will handle all application models // Here is where you've to register your custom models // If you create a new model with Alfred it will be auto-registered Models = register.ModelRegister{ List: []interface{}{ model.User{}, }, } // Services will handle all app IOC services // Every service needs to be registered in the following list Services = register.ServiceRegister{ List: []interface{}{ app.Configuration, service.ConnectDB, service.ConnectElastic, service.ConnectMongo, service.ConnectRedis, }, } // SingletonServices represent all IOC services that have to be initialized only once. // Every service needs to be registered in the following list SingletonServices = register.ServiceRegister{ List: []interface{}{}, } CommandServices = register.ServiceRegister{ List: []interface{}{ app.Configuration, service.ConnectDB, service.ConnectElastic, service.ConnectMongo, service.ConnectRedis, }, } // Commands configuration represent all Go-Web application conf // Every command needs to be registered in the following list Commands = console.Commands Middleware = register.MiddlewareRegister{ List: []interface{}{ &middleware.AuthMiddleware{ Name: "Auth", Description: "Provides JWT authentication", }, &middleware.BasicAuthMiddleware{ Name: "BasicAuth", Description: "Provides basic authentication", }, &middleware.LoggingMiddleware{ Name: "Logging", Description: "Logs every request in console", }, &middleware.RateLimiterMiddleware{ Name: "RateLimiter", Description: "Provides rate limit over HTTP requests", }, &middleware.RefreshTokenMiddleware{ Name: "RefreshToken", Description: "Refresh JWT token", }, }, } )
Functions ¶
func BaseEntities ¶
func BaseEntities() foundation.BaseEntities
BaseEntities returns a struct that contains Go-Web base entities
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.