vegapokerbot/internal/app/db_wrapper.go

23 lines
440 B
Go
Raw Normal View History

2024-05-09 17:42:42 +03:00
package app
import (
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/db"
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface"
2024-05-09 17:42:42 +03:00
)
type DBWrapper struct {
r *db.Repositories
}
func (w *DBWrapper) ForUser() iface.UserRepository {
2024-05-09 17:42:42 +03:00
return w.r.User
}
func (w *DBWrapper) ForChat() iface.ChatRepository {
2024-05-09 17:42:42 +03:00
return w.r.Chat
}
func (w *DBWrapper) ForIntegration() iface.IntegrationRepository {
return w.r.Integration
}