silvermobi/handler/handler.go

22 lines
505 B
Go
Raw Normal View History

2023-08-08 10:28:43 +00:00
package handler
import (
"git.coopgo.io/coopgo-apps/silvermobi/services"
"git.coopgo.io/coopgo-apps/silvermobi/storage"
"github.com/spf13/viper"
)
type SilvermobiHandler struct {
2023-12-08 06:35:04 +00:00
Config *viper.Viper
Services *services.ServicesHandler
Storage storage.Storage
2023-08-08 10:28:43 +00:00
}
2023-12-08 06:35:04 +00:00
func NewSilvermobiHandler(cfg *viper.Viper, services *services.ServicesHandler, storage storage.Storage) (*SilvermobiHandler, error) {
2023-08-08 10:28:43 +00:00
return &SilvermobiHandler{
2023-12-08 06:35:04 +00:00
Config: cfg,
Services: services,
Storage: storage,
2023-08-08 10:28:43 +00:00
}, nil
}