feat(grpc): add gRPC server infrastructure and schedule sync service
Add gRPC server support with configurable TLS, environment-based settings, and Wire injection. Implement schedule synchronization service with task runner integration for external course data fetching. - Add gRPC configuration with env var overrides (APP_GRPC_ENABLED, APP_GRPC_PORT, etc.) - Create gRPC server infrastructure with runner task management - Implement ScheduleSyncService for course data synchronization - Add sync endpoint to schedule handler for external system integration - Update repository with context-aware batch delete operation - Wire all dependencies including zap logger for structured logging
This commit is contained in:
@@ -170,6 +170,7 @@ func (r *Router) setupRoutes() {
|
||||
{
|
||||
schedule.GET("/courses", r.scheduleHandler.ListCourses)
|
||||
schedule.POST("/courses", r.scheduleHandler.CreateCourse)
|
||||
schedule.POST("/sync", r.scheduleHandler.SyncSchedule) // 同步课表
|
||||
schedule.PUT("/courses/:id", r.scheduleHandler.UpdateCourse)
|
||||
schedule.DELETE("/courses/:id", r.scheduleHandler.DeleteCourse)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user