carpool-service/handler/handler.go

25 lines
659 B
Go
Raw Normal View History

2023-03-27 18:54:56 +00:00
package handler
import (
"git.coopgo.io/coopgo-platform/carpool-service/storage"
2023-03-29 10:50:25 +00:00
"git.coopgo.io/coopgo-platform/carpool-service/tiles"
"git.coopgo.io/coopgo-platform/routing-service"
2023-03-27 18:54:56 +00:00
"github.com/spf13/viper"
)
type CarpoolServiceHandler struct {
Config *viper.Viper
Storage storage.Storage
2023-03-29 10:50:25 +00:00
Tiles *tiles.TilesHandler
Routing routing.RoutingService
2023-03-27 18:54:56 +00:00
}
2023-03-29 10:50:25 +00:00
func NewCarpoolServiceHandler(cfg *viper.Viper, storage storage.Storage, tilesHandler *tiles.TilesHandler, routing routing.RoutingService) (*CarpoolServiceHandler, error) {
2023-03-27 18:54:56 +00:00
return &CarpoolServiceHandler{
Config: cfg,
Storage: storage,
2023-03-29 10:50:25 +00:00
Tiles: tilesHandler,
Routing: routing,
2023-03-27 18:54:56 +00:00
}, nil
}