fusen-gateway/server/logic/gateway_logic_gen.go
2023-11-17 18:35:28 +08:00

26 lines
480 B
Go

package logic
import (
"context"
"fusen-gateway/gen/go/service"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/grpc"
)
func AutoRegisterHandler(ctx context.Context, mux *runtime.ServeMux, opts ...grpc.DialOption) error {
var err error
err = service.RegisterAuthHandlerClientNacos(ctx, mux, opts...)
if err != nil {
return err
}
err = service.RegisterInfoHandlerClientNacos(ctx, mux, opts...)
if err != nil {
return err
}
return nil
}