add minioClient to answer Repo
This commit is contained in:
parent
a7f632c441
commit
4f61bc17b0
@ -58,10 +58,10 @@ func New(ctx context.Context, cred string, authClient *auth.AuthClient, minioCli
|
|||||||
Pool: pool,
|
Pool: pool,
|
||||||
})
|
})
|
||||||
|
|
||||||
storerAnswer := &StorerAnswer{}
|
storerAnswer := &answer.StorerAnswer{}
|
||||||
|
|
||||||
if minioClient != nil {
|
if minioClient != nil {
|
||||||
storerAnswer, err = NewAnswerMinio(ctx, minioClient)
|
storerAnswer, err = answer.NewAnswerMinio(ctx, minioClient)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal"
|
|
||||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal/sqlcgen"
|
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal/sqlcgen"
|
||||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/model"
|
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/model"
|
||||||
)
|
)
|
||||||
@ -12,13 +11,13 @@ import (
|
|||||||
type Deps struct {
|
type Deps struct {
|
||||||
Queries *sqlcgen.Queries
|
Queries *sqlcgen.Queries
|
||||||
Pool *sql.DB
|
Pool *sql.DB
|
||||||
AnswerMinio *dal.StorerAnswer
|
AnswerMinio *StorerAnswer
|
||||||
}
|
}
|
||||||
|
|
||||||
type AnswerRepository struct {
|
type AnswerRepository struct {
|
||||||
queries *sqlcgen.Queries
|
queries *sqlcgen.Queries
|
||||||
pool *sql.DB
|
pool *sql.DB
|
||||||
answerMinio *dal.StorerAnswer
|
answerMinio *StorerAnswer
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAnswerRepository(deps Deps) *AnswerRepository {
|
func NewAnswerRepository(deps Deps) *AnswerRepository {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package dal
|
package answer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
Loading…
Reference in New Issue
Block a user