fusen-gateway/server/logic/gateway_logic_gen.go
2023-11-21 18:30:26 +08:00

31 lines
581 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.RegisterNotifyHandlerClientNacos(ctx, mux, opts...)
if err != nil {
return err
}
err = service.RegisterInfoHandlerClientNacos(ctx, mux, opts...)
if err != nil {
return err
}
return nil
}