teldrive/pkg/controller/controller.go
2023-12-03 03:16:53 +05:30

22 lines
585 B
Go

package controller
import (
"github.com/divyam234/teldrive/pkg/database"
"github.com/divyam234/teldrive/pkg/services"
)
type Controller struct {
FileService *services.FileService
UserService *services.UserService
UploadService *services.UploadService
AuthService *services.AuthService
}
func NewController() *Controller {
return &Controller{
FileService: services.NewFileService(database.DB),
UserService: services.NewUserService(database.DB),
UploadService: services.NewUploadService(database.DB),
AuthService: services.NewAuthService(database.DB),
}
}