generated from VLADIMIR/template
clear
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package health_repo
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
type Repo struct {
|
||||
pool *pgxpool.Pool
|
||||
}
|
||||
|
||||
func New(pool *pgxpool.Pool) *Repo {
|
||||
return &Repo{pool: pool}
|
||||
}
|
||||
|
||||
func (r *Repo) Check(ctx context.Context) error {
|
||||
return r.pool.Ping(ctx)
|
||||
}
|
||||
Reference in New Issue
Block a user