2023-12-03 03:47:23 +08:00
|
|
|
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{
|
2023-12-03 05:46:53 +08:00
|
|
|
FileService: services.NewFileService(database.DB),
|
|
|
|
UserService: services.NewUserService(database.DB),
|
|
|
|
UploadService: services.NewUploadService(database.DB),
|
|
|
|
AuthService: services.NewAuthService(database.DB),
|
2023-12-03 03:47:23 +08:00
|
|
|
}
|
|
|
|
}
|