modelとexternalからdomainを作る処理をserviceかhandlerで書きたい
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by tracing the handler-service-repository-database/external flow and reviewing infrastructure/traq.go, portal.go, knoq.go, interfaces/external, usecases, and wire.go. Check the build flag situation before editing wire.go. Done means external calls are removed from repositories, services combine models with external data into domains, and the listed package moves and repository signatures are resolved.
Written by the indexing model from the issue text.
Description
今はrepositoryからdomainを返しているためrepositoryの中でexternal(とDB操作のdatabase)を呼んでいる
handler->service->repository->database,external
repositoryではrepository以上のこと(CRUD)をしたくないため、serviceかhandlerでこれをしたい
これをするためにはrepositoryの引数/返り値をdomainからmodelにする必要がありそう
handler->service->(repository->database),external
infrastructure/traq.go,portal.go,knoq.goがinfrastructureにあるのも微妙な気がする
externalって名前も変えていい
wire.goを修正する必要があるので注意 (build flagを立てているため補完が効かない、一時的に外すと良い)
- interfaces/externalをusecases/externalに移動、infra/{traq,portal,knoq,apiclient}.goをinterfaces/externalに移動
- 各Repositoryからexternalを抜く
- 各Serviceにexternal.TraqAPIなどを追加し、ここからexternalを呼ぶようにする
- Repositoryの返り値(引数はdomainのままでもいいのかも)をmodelにする
- serviceでmodelとexternalを組み合わせてdomainを返すようにする
- Dominant language
- Go
- Stars
- 6
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from traPtitech/traPortfolio
-
stg デプロイ先変更に伴う対応 Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
traPtitech/traPortfolio#784 ·
-
定期的にユーザーを同期する Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
traPtitech/traPortfolio#756 ·
-
go-cacheやめたい Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
traPtitech/traPortfolio#714 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
traPtitech/traPortfolio#706 ·
-
breaking
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
traPtitech/traPortfolio#702 ·
All issues in traPtitech/traPortfolio
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100