feat: add system service (#2083)

* feat: add system service

* chore: update
This commit is contained in:
boojack
2023-08-05 21:30:23 +08:00
committed by GitHub
parent 270a529948
commit 238f896907
25 changed files with 940 additions and 71 deletions

View File

@@ -29,6 +29,7 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store
authProvider.AuthenticationInterceptor,
),
)
apiv2pb.RegisterSystemServiceServer(grpcServer, NewSystemService(profile, store))
apiv2pb.RegisterUserServiceServer(grpcServer, NewUserService(store))
apiv2pb.RegisterMemoServiceServer(grpcServer, NewMemoService(store))
apiv2pb.RegisterTagServiceServer(grpcServer, NewTagService(store))
@@ -60,6 +61,9 @@ func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error
}
gwMux := grpcRuntime.NewServeMux()
if err := apiv2pb.RegisterSystemServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterUserServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}