Skip to content

Refactor Repositoryのinterface化#612

Open
Nzt3-gh wants to merge 5 commits intomainfrom
repository-interface
Open

Refactor Repositoryのinterface化#612
Nzt3-gh wants to merge 5 commits intomainfrom
repository-interface

Conversation

@Nzt3-gh
Copy link
Copy Markdown
Contributor

@Nzt3-gh Nzt3-gh commented Sep 9, 2025

db.GormRepository と repository.Repository を interface化しました。
それに伴い、構造体を使用していたmain.go,cron.goにinterfaceを使用するように変更を加えました。

@Nzt3-gh Nzt3-gh requested a review from iChemy September 15, 2025 17:13
@Nzt3-gh
Copy link
Copy Markdown
Contributor Author

Nzt3-gh commented Oct 14, 2025

  • EventRepository,GroupRepositoryなどの機能ごとに分離したinterface定義がdomainにある
    • 現状のrepositoryはファイルごとに機能ごとのinterfaceを実装しているが、実装をdb.GormRepository構造体,traq.TraQRepository構造体に依存しているので機能ごとに分けることはない
  • db.GormRepository,traq.TraQRepositoryを使ってdomain.Repositoryを実装したものがrepository直下に存在しているのが意味的にまずそう
    • 実装の1つとして分けるべき?

@iChemy
Copy link
Copy Markdown
Contributor

iChemy commented Oct 21, 2025

すみません,確認遅れました.
↑,「実装の1つとして分けるべき?」とは具体的にはどのような変更が考えれそうですか?

@iChemy
Copy link
Copy Markdown
Contributor

iChemy commented Dec 2, 2025

@Nzt3-gh
もし,いい感じのところまで進んでそうだったらコミットしてほしいです.確認します.
急ピッチで進めないといけなそうだったのでこちらでも手を動かして同じタスクをやってしまったので
もし進んでなさそうだったり詰まってたりしたら #620 の方のレビューをしてもらうという風にしたいです.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants