// BuildContainer returns a container with all app dependencies built in
BuildContainer returns a container with all app dependencies built in
// BuildContainer returns a container with all app dependencies built in
func BuildContainer() *dig.Container {
	container := dig.New()
	container.Provide(config.NewConfig)
	container.Provide(repositories.NewDBCollections)
	container.Provide(repositories.NewUserRepository)
	container.Provide(repositories.NewRoleRepository)
	container.Provide(services.NewUserService)
	container.Provide(services.NewRoleService)
	container.Provide(services.NewTokenService)
	container.Provide(controllers.NewRoleController)
	container.Provide(controllers.NewUserController)
	container.Provide(middleware.NewMiddleware)
	container.Provide(handlers.NewHttpHandlers)
	container.Provide(server.NewServer)
	return container
}
func BuildContainer ( ) * dig . Container { container := dig . New ( ) container . Provide ( config . NewConfig ) container . Provide ( repositories . NewDBCollections ) container . Provide ( repositories . NewUserRepository ) container . Provide ( repositories . NewRoleRepository ) container . Provide ( services . NewUserService ) container . Provide ( services . NewRoleService ) container . Provide ( services . NewTokenService ) container . Provide ( controllers . NewRoleController ) container . Provide ( controllers . NewUserController ) container . Provide ( middleware . NewMiddleware ) container . Provide ( handlers . NewHttpHandlers ) container . Provide ( server . NewServer ) return container }
BuildContainer returns a container with all app dependencies built in
BuildContainer returns a container with all app dependencies built in
// config // persistance layer // services // controllers // generic http layer // server