feat: add markdown service

This commit is contained in:
Steven
2023-12-17 09:53:22 +08:00
parent bb42042db4
commit 28c0549705
13 changed files with 3428 additions and 223 deletions

View File

@@ -26,6 +26,7 @@ type APIV2Service struct {
apiv2pb.UnimplementedInboxServiceServer
apiv2pb.UnimplementedActivityServiceServer
apiv2pb.UnimplementedWebhookServiceServer
apiv2pb.UnimplementedMarkdownServiceServer
Secret string
Profile *profile.Profile
@@ -60,6 +61,7 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store
apiv2pb.RegisterInboxServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterActivityServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterWebhookServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterMarkdownServiceServer(grpcServer, apiv2Service)
reflection.Register(grpcServer)
return apiv2Service
@@ -110,6 +112,9 @@ func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error
if err := apiv2pb.RegisterWebhookServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterMarkdownServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
e.Any("/api/v2/*", echo.WrapHandler(gwMux))
// GRPC web proxy.