feat: moved project from lab2

This commit is contained in:
TAskMAster339
2026-10-10 12:14:31 +03:00
parent 0ab3a341aa
commit a856733fe9
59 changed files with 5346 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
package repositories
import (
"context"
"github.com/jackc/pgx/v5/pgxpool"
)
type HealthStore struct {
db *pgxpool.Pool
}
func NewHealthStore(db *pgxpool.Pool) *HealthStore {
return &HealthStore{db: db}
}
func (s *HealthStore) Ping(ctx context.Context) error {
ctx, cancel := boundedQuery(ctx)
defer cancel()
return s.db.Ping(ctx)
}