mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 17:30:30 +00:00
Refactor to support multiple server instances in shared library
This commit is contained in:
18
api/handlers/handlers.go
Normal file
18
api/handlers/handlers.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/pikami/cosmium/api/config"
|
||||
"github.com/pikami/cosmium/internal/repositories"
|
||||
)
|
||||
|
||||
type Handlers struct {
|
||||
repository *repositories.DataRepository
|
||||
config config.ServerConfig
|
||||
}
|
||||
|
||||
func NewHandlers(dataRepository *repositories.DataRepository, config config.ServerConfig) *Handlers {
|
||||
return &Handlers{
|
||||
repository: dataRepository,
|
||||
config: config,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user