teldrive/pkg/controller/controller.go

24 lines
654 B
Go
Raw Normal View History

2023-12-03 03:47:23 +08:00
package controller
import (
"github.com/divyam234/teldrive/pkg/database"
"github.com/divyam234/teldrive/pkg/services"
"go.uber.org/zap"
2023-12-03 03:47:23 +08:00
)
type Controller struct {
FileService *services.FileService
UserService *services.UserService
UploadService *services.UploadService
AuthService *services.AuthService
}
func NewController(logger *zap.Logger) *Controller {
2023-12-03 03:47:23 +08:00
return &Controller{
FileService: services.NewFileService(database.DB, logger),
UserService: services.NewUserService(database.DB, logger),
UploadService: services.NewUploadService(database.DB, logger),
AuthService: services.NewAuthService(database.DB, logger),
2023-12-03 03:47:23 +08:00
}
}