This commit is contained in:
2026-08-10 11:16:02 +08:00
parent f994b2de9c
commit 007a7ba38a
26 changed files with 469 additions and 142 deletions

View File

@@ -1,11 +1,17 @@
package service
import (
"bsm/full/module/base/fts/internal/config"
"bsm/full/module/base/fts/internal/routers"
"github.com/gin-gonic/gin"
)
func Expose(engine *gin.Engine) error {
type Config = config.SrvConfig
func Expose(engine *gin.Engine, cfg *Config) error {
if cfg != nil {
config.Spec = *cfg
}
routers.Register("fts", engine)
return nil
}

View File

@@ -1,11 +1,17 @@
package service
import (
"bsm/full/module/base/mgt/internal/config"
"bsm/full/module/base/mgt/internal/routers"
"github.com/gin-gonic/gin"
)
func Expose(engine *gin.Engine) error {
type Config = config.SrvConfig
func Expose(engine *gin.Engine, cfg *Config) error {
if cfg != nil {
config.Spec = *cfg
}
routers.Register("mgt", engine)
return nil
}

View File

@@ -3,6 +3,7 @@ package service
import (
"context"
"bsm/full/module/base/passport/internal/config"
"bsm/full/module/base/passport/internal/server"
pb "bsm/full/module/base/passport/pb"
gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
@@ -12,9 +13,15 @@ import (
type ExposeOptions struct {
GRPC *grpc.Server
Gateway *gwRuntime.ServeMux
Config *Config
}
type Config = config.SrvConfig
func Expose(options ExposeOptions) error {
if options.Config != nil {
config.Spec = *options.Config
}
server.New(options.GRPC)
ctx := context.Background()

View File

@@ -3,6 +3,7 @@ package service
import (
"context"
"bsm/full/module/base/sender/internal/config"
"bsm/full/module/base/sender/internal/server"
pb "bsm/full/module/base/sender/pb"
gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
@@ -12,9 +13,15 @@ import (
type ExposeOptions struct {
GRPC *grpc.Server
Gateway *gwRuntime.ServeMux
Config *Config
}
type Config = config.SrvConfig
func Expose(options ExposeOptions) error {
if options.Config != nil {
config.Spec = *options.Config
}
server.New(options.GRPC)
ctx := context.Background()

View File

@@ -3,6 +3,7 @@ package service
import (
"context"
"bsm/full/module/finance/wallet/internal/config"
"bsm/full/module/finance/wallet/internal/server"
pb "bsm/full/module/finance/wallet/pb"
gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
@@ -12,9 +13,15 @@ import (
type ExposeOptions struct {
GRPC *grpc.Server
Gateway *gwRuntime.ServeMux
Config *Config
}
type Config = config.SrvConfig
func Expose(options ExposeOptions) error {
if options.Config != nil {
config.Spec = *options.Config
}
server.New(options.GRPC)
ctx := context.Background()