go-urlsh/internal/web/model.go

23 lines
450 B
Go
Raw Permalink Normal View History

2024-09-30 13:19:01 +02:00
package web
import (
"code.lila.network/adoralaura/go-urlsh/internal/config"
"github.com/rs/zerolog"
"github.com/uptrace/bun"
)
type WebRouteManager struct {
db *bun.DB
logger *zerolog.Logger
config *config.Config
}
func NewWebRouteManager(db *bun.DB, logger *zerolog.Logger, config *config.Config) *WebRouteManager {
manager := new(WebRouteManager)
manager.db = db
manager.logger = logger
manager.config = config
return manager
}