forked from mtusi2026/mtusi2026lab3
refactor(service): move txBeginner to separate file
This commit is contained in:
@@ -30,10 +30,6 @@ type chatQueries interface {
|
||||
ListChatsFirstPage(ctx context.Context, arg db.ListChatsFirstPageParams) ([]db.ListChatsFirstPageRow, error)
|
||||
}
|
||||
|
||||
type txBeginner interface {
|
||||
Begin(ctx context.Context) (pgx.Tx, error)
|
||||
}
|
||||
|
||||
type ChatService struct {
|
||||
pool txBeginner
|
||||
q chatQueries
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
|
||||
type txBeginner interface {
|
||||
Begin(ctx context.Context) (pgx.Tx, error)
|
||||
}
|
||||
Reference in New Issue
Block a user