initial commit
This commit is contained in:
26
internal/repository/repository.go
Normal file
26
internal/repository/repository.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"git.kirlllll.ru/volontery/backend/internal/database"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
// Repository содержит все репозитории приложения
|
||||
type Repository struct {
|
||||
User *UserRepository
|
||||
Auth *AuthRepository
|
||||
Request *RequestRepository
|
||||
RBAC *RBACRepository
|
||||
}
|
||||
|
||||
// New создает новый экземпляр Repository
|
||||
func New(pool *pgxpool.Pool) *Repository {
|
||||
queries := database.New(pool)
|
||||
|
||||
return &Repository{
|
||||
User: NewUserRepository(queries),
|
||||
Auth: NewAuthRepository(queries),
|
||||
Request: NewRequestRepository(queries),
|
||||
RBAC: NewRBACRepository(queries),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user