BLOG-43 refactor: rename gateway -> repository
All checks were successful
Frontend CI / build (push) Successful in 1m29s
All checks were successful
Frontend CI / build (push) Successful in 1m29s
This commit is contained in:
parent
a4394eea9e
commit
d7c6c97051
@ -5,7 +5,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/gateway"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/repository"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/application"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/framework/api/graph"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/framework/db/postgres"
|
||||
@ -53,7 +53,7 @@ func initGraphqlHandler(resolver *graph.Resolver) *handler.Server {
|
||||
}
|
||||
|
||||
func createResolver(db *sql.DB) *graph.Resolver {
|
||||
postRepo := gateway.NewPostRepo(postgres.NewPostDBService(db))
|
||||
postRepo := repository.NewPostRepo(postgres.NewPostDBService(db))
|
||||
|
||||
return &graph.Resolver{
|
||||
GetAllPostsUseCase: application.NewGetAllPostsUseCase(postRepo),
|
||||
|
@ -1,7 +1,7 @@
|
||||
package gateway
|
||||
package repository
|
||||
|
||||
import (
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/gateway/dbdto"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/repository/dbdto"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/application"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/domain"
|
||||
"github.com/thoas/go-funk"
|
@ -5,15 +5,15 @@ import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/gateway"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/gateway/dbdto"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/repository"
|
||||
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/repository/dbdto"
|
||||
)
|
||||
|
||||
type postDBService struct {
|
||||
db *sql.DB
|
||||
}
|
||||
|
||||
func NewPostDBService(db *sql.DB) gateway.PostDBService {
|
||||
func NewPostDBService(db *sql.DB) repository.PostDBService {
|
||||
return &postDBService{db}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user