mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 23:03:57 +08:00
33 lines
580 B
Go
33 lines
580 B
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"
|
|
v1 "github.com/chaitin/MonkeyCode/backend/internal/scanner/handler/http/v1"
|
|
"github.com/chaitin/MonkeyCode/backend/pkg/version"
|
|
)
|
|
|
|
type Server struct {
|
|
config *config.Config
|
|
web *web.Web
|
|
logger *slog.Logger
|
|
version *version.VersionInfo
|
|
scanner *v1.ScannerHandler
|
|
}
|
|
|
|
func newServer() (*Server, error) {
|
|
wire.Build(
|
|
wire.Struct(new(Server), "*"),
|
|
AppSet,
|
|
)
|
|
return &Server{}, nil
|
|
}
|