26 lines
791 B
Go
26 lines
791 B
Go
package controllers
|
|
|
|
import (
|
|
"sprechstundentool/config"
|
|
"sprechstundentool/models"
|
|
)
|
|
|
|
// BaseHandler will hold everything that controller needs
|
|
type BaseHandler struct {
|
|
roomRepo models.RoomRepository
|
|
officeHourRepo models.OfficeHourRepository
|
|
courseRepo models.CourseRepository
|
|
tutorRepo models.TutorRepository
|
|
requestRepo models.RequestRepository
|
|
config config.Config
|
|
}
|
|
|
|
// NewBaseHandler returns a new BaseHandler
|
|
func NewBaseHandler(roomRepo models.RoomRepository,
|
|
officeHourRepo models.OfficeHourRepository,
|
|
courseRepo models.CourseRepository,
|
|
tutorRepo models.TutorRepository,
|
|
requestRepo models.RequestRepository,
|
|
config config.Config) *BaseHandler {
|
|
return &BaseHandler{roomRepo, officeHourRepo, courseRepo, tutorRepo, requestRepo, config}
|
|
}
|