mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-01-08 08:10:05 +08:00
23 lines
654 B
Go
23 lines
654 B
Go
package controller
|
|
|
|
import (
|
|
"github.com/divyam234/teldrive/pkg/database"
|
|
"github.com/divyam234/teldrive/pkg/services"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
type Controller struct {
|
|
FileService *services.FileService
|
|
UserService *services.UserService
|
|
UploadService *services.UploadService
|
|
AuthService *services.AuthService
|
|
}
|
|
|
|
func NewController(logger *zap.Logger) *Controller {
|
|
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),
|
|
}
|
|
}
|