forked from mtusi2026/mtusi2026lab2
20 lines
294 B
Go
20 lines
294 B
Go
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 {
|
|
return s.db.Ping(ctx)
|
|
}
|