Documentation ¶
Index ¶
- func GetEnv(key, fallback string) string
- func MigrateDB(viper *viper.Viper, logger *logrus.Logger)
- func NewDatabase(viper *viper.Viper, log *logrus.Logger) *gorm.DB
- func NewErrorHandler() fiber.ErrorHandler
- func NewFiber(viper *viper.Viper) *fiber.App
- func NewLogger(viper *viper.Viper) *logrus.Logger
- func NewValidator(viper *viper.Viper) *validator.Validate
- func NewViper() *viper.Viper
- type RouteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorHandler ¶
func NewErrorHandler() fiber.ErrorHandler
func NewValidator ¶
Types ¶
type RouteConfig ¶
type RouteConfig struct { App *fiber.App Config *viper.Viper Log *logrus.Logger UserController *controller.UserController ArticleController *controller.ArticleController TagController *controller.TagController CommentController *controller.CommentController AuthMiddleware fiber.Handler }
func NewRouteConfig ¶
func NewRouteConfig(app *fiber.App, config *viper.Viper, log *logrus.Logger, userController *controller.UserController, articleController *controller.ArticleController, tagController *controller.TagController, commentController *controller.CommentController, authMiddleware fiber.Handler) *RouteConfig
func (*RouteConfig) SetupRoutes ¶
func (c *RouteConfig) SetupRoutes()
func (*RouteConfig) StartServer ¶
func (c *RouteConfig) StartServer()
Click to show internal directories.
Click to hide internal directories.