refactor(eventbus): replace EventBus struct with EventBus interface#50
Merged
Conversation
- Remove unused EventBus struct and NewEventBus function (dead code) - Replace PublisherSubscriber interface with EventBus interface for better semantics - Update SetupRouter to accept EventBus interface instead of concrete Publisher type - Enable SessionService to use the same NATS connection for both publish and subscribe This change improves code architecture by: 1. Removing dead code (EventBus struct was never used) 2. Using idiomatic Go interface composition 3. Ensuring single NATS connection throughout the application 4. Better semantic naming (EventBus > PublisherSubscriber)
- 修改Session结构体: user_id → uin - 修改SkillExecutionLog结构体: user_id → uin - 更新API契约层字段名 - 更新DAO层查询条件 - 更新Service层业务逻辑 - 更新测试用例 - 重新生成Swagger文档
- organization.go和user_org.go表名添加singer_前缀 - User结构添加Password字段支持本地认证 - 添加InitDevData函数初始化默认组织、用户和用户组织关联 - 使用bcrypt加密默认用户密码Admin123456 - 修复中间件中的认证旁路问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change improves code architecture by: