Files
MonkeyCode/backend/cmd/server/wire.go
Haoxin Li b5ecb92371 feat: feat: Implement workspace and real-time file synchronization
- Added WorkspaceFileHandler for handling workspace file operations including create, update, delete, and list functionalities.
- Introduced WorkspaceFileRepo for database interactions related to workspace files.
- Created WorkspaceFileUsecase to encapsulate business logic for workspace file management.
- Implemented API endpoints for workspace file operations with appropriate request and response structures.
- Added database migrations for creating workspaces and workspace_files tables with necessary constraints and indexes.
- Enhanced user authentication and authorization for workspace file operations.
2025-07-23 17:42:20 +08:00

49 lines
1.4 KiB
Go

//go:build wireinject
// +build wireinject
package main
import (
"log/slog"
"github.com/google/wire"
"github.com/GoYoko/web"
"github.com/chaitin/MonkeyCode/backend/config"
"github.com/chaitin/MonkeyCode/backend/db"
"github.com/chaitin/MonkeyCode/backend/domain"
billingv1 "github.com/chaitin/MonkeyCode/backend/internal/billing/handler/http/v1"
dashv1 "github.com/chaitin/MonkeyCode/backend/internal/dashboard/handler/v1"
v1 "github.com/chaitin/MonkeyCode/backend/internal/model/handler/http/v1"
openaiV1 "github.com/chaitin/MonkeyCode/backend/internal/openai/handler/v1"
sockethandler "github.com/chaitin/MonkeyCode/backend/internal/socket/handler"
userV1 "github.com/chaitin/MonkeyCode/backend/internal/user/handler/v1"
"github.com/chaitin/MonkeyCode/backend/pkg/report"
"github.com/chaitin/MonkeyCode/backend/pkg/version"
)
type Server struct {
config *config.Config
web *web.Web
ent *db.Client
logger *slog.Logger
openaiV1 *openaiV1.V1Handler
modelV1 *v1.ModelHandler
userV1 *userV1.UserHandler
dashboardV1 *dashv1.DashboardHandler
billingV1 *billingv1.BillingHandler
socketH *sockethandler.SocketHandler
version *version.VersionInfo
report *report.Reporter
reportuse domain.ReportUsecase
}
func newServer() (*Server, error) {
wire.Build(
wire.Struct(new(Server), "*"),
appSet,
)
return &Server{}, nil
}