Files
EchoChat/backend/go-service/app/provider/wire.go
bujinyuan c8ffbedf75 feat(backend): Go 服务骨架(配置、日志、数据库、中间件、Wire)
- config: Viper YAML 配置 + 环境变量覆盖
- logs: zap 结构化日志 + trace_id 链路追踪 + 敏感信息脱敏
- db: PostgreSQL (GORM) + Redis (go-redis) 连接管理
- middleware: Trace/Logger/CORS/Recovery 四层中间件
- provider: Wire 编译时依赖注入
- main.go: 优雅启动/关闭 HTTP 服务

Made-with: Cursor
2026-02-28 10:41:20 +08:00

18 lines
338 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//go:build wireinject
// Package provider 提供 Wire 依赖注入入口
package provider
import (
"github.com/echochat/backend/config"
"github.com/google/wire"
)
// InitializeApp 初始化整个应用Wire 自动生成实现)
func InitializeApp(cfg *config.Config) (*App, error) {
wire.Build(
InfraSet,
)
return nil, nil
}