refactor: move backend files to backend/ directory
Reorganize project structure: - backend/cmd/openteam/ — entry point - backend/internal/ — core packages - backend/middleware/ — HTTP middleware - backend/router/ — route setup - backend/wire/ — dependency injection - backend/pkg/ — shared utilities - backend/go.mod, go.sum — Go module files Updated Makefile to work from backend/ directory. Removed old lowercase makefile.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
//go:build wireinject
|
||||
// +build wireinject
|
||||
|
||||
package wire
|
||||
|
||||
import (
|
||||
"context"
|
||||
"opencatd-open/internal/channel"
|
||||
"opencatd-open/internal/controller/proxy"
|
||||
"opencatd-open/internal/dao"
|
||||
"opencatd-open/pkg/config"
|
||||
"sync"
|
||||
|
||||
"github.com/google/wire"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var daoSet = wire.NewSet(
|
||||
dao.NewUserDAO,
|
||||
dao.NewApiKeyDAO,
|
||||
dao.NewTokenDAO,
|
||||
dao.NewUsageDAO,
|
||||
dao.NewDailyUsageDAO,
|
||||
dao.NewChannelDAO,
|
||||
dao.NewModelDAO,
|
||||
)
|
||||
|
||||
var channelSet = wire.NewSet(
|
||||
channel.NewService,
|
||||
channel.NewHealthChecker,
|
||||
)
|
||||
|
||||
func InitProxyHandler(ctx context.Context, cfg *config.Config, db *gorm.DB, wg *sync.WaitGroup) (*proxy.Proxy, error) {
|
||||
wire.Build(daoSet, channelSet, proxy.NewProxy)
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user