Files
go-tracker/internal/storage/storage.go
2025-11-12 09:41:52 +03:00

26 lines
673 B
Go

package storage
import (
"github.com/jackc/pgx/v5/pgxpool"
)
type Storage struct {
Projects ProjectRepository
ServerSettings ServerSettingsRepository
Issues IssueRepository
Status StatusRepository
User UserRepository
UserToProject UserToProjectRepository
}
func NewStorage(client *pgxpool.Pool) *Storage {
return &Storage{
Projects: &ProjectStore{client: client},
ServerSettings: &ServerSettingsStore{client: client},
Issues: &IssueStore{client: client},
Status: &StatusStore{client: client},
User: &UserStore{client: client},
UserToProject: &UserToProjectStore{client: client},
}
}