diff --git a/DysonNetwork.Insight/Program.cs b/DysonNetwork.Insight/Program.cs index 9fc5c554..9571fe59 100644 --- a/DysonNetwork.Insight/Program.cs +++ b/DysonNetwork.Insight/Program.cs @@ -39,10 +39,6 @@ using (var scope = app.Services.CreateScope()) await db.Database.MigrateAsync(); } -app.MapGrpcService(); -app.MapGrpcService(); -app.MapGrpcService(); - app.ConfigureAppMiddleware(builder.Configuration); app.UseSwaggerManifest("DysonNetwork.Insight"); diff --git a/DysonNetwork.Shared/Proto/web_article.proto b/DysonNetwork.Shared/Proto/web_article.proto index 9687fdb7..5629809b 100644 --- a/DysonNetwork.Shared/Proto/web_article.proto +++ b/DysonNetwork.Shared/Proto/web_article.proto @@ -9,152 +9,152 @@ import "embed.proto"; import "publisher.proto"; message WebFeedConfig { - bool scrap_page = 1; + bool scrap_page = 1; } message WebFeed { - string id = 1; - string url = 2; - string title = 3; - optional string description = 4; - optional google.protobuf.Timestamp verified_at = 5; - optional LinkEmbed preview = 6; - WebFeedConfig config = 7; - string publisher_id = 8; - optional Publisher publisher = 9; - google.protobuf.Timestamp created_at = 10; - google.protobuf.Timestamp updated_at = 11; - optional google.protobuf.Timestamp deleted_at = 12; + string id = 1; + string url = 2; + string title = 3; + optional string description = 4; + optional google.protobuf.Timestamp verified_at = 5; + optional LinkEmbed preview = 6; + WebFeedConfig config = 7; + string publisher_id = 8; + optional Publisher publisher = 9; + google.protobuf.Timestamp created_at = 10; + google.protobuf.Timestamp updated_at = 11; + optional google.protobuf.Timestamp deleted_at = 12; } message WebArticle { - string id = 1; - string title = 2; - string url = 3; - optional string author = 4; - optional bytes meta = 5; - optional LinkEmbed preview = 6; - optional string content = 7; - optional google.protobuf.Timestamp published_at = 8; - string feed_id = 9; - optional WebFeed feed = 10; - google.protobuf.Timestamp created_at = 11; - google.protobuf.Timestamp updated_at = 12; - optional google.protobuf.Timestamp deleted_at = 13; + string id = 1; + string title = 2; + string url = 3; + optional string author = 4; + optional bytes meta = 5; + optional LinkEmbed preview = 6; + optional string content = 7; + optional google.protobuf.Timestamp published_at = 8; + string feed_id = 9; + optional WebFeed feed = 10; + google.protobuf.Timestamp created_at = 11; + google.protobuf.Timestamp updated_at = 12; + optional google.protobuf.Timestamp deleted_at = 13; } message WebFeedSubscription { - string id = 1; - string feed_id = 2; - optional WebFeed feed = 3; - string account_id = 4; - google.protobuf.Timestamp created_at = 5; - google.protobuf.Timestamp updated_at = 6; + string id = 1; + string feed_id = 2; + optional WebFeed feed = 3; + string account_id = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; } message ScrapedArticle { - LinkEmbed link_embed = 1; - optional string content = 2; + LinkEmbed link_embed = 1; + optional string content = 2; } message GetWebArticleRequest { - string id = 1; + string id = 1; } message GetWebArticleResponse { - WebArticle article = 1; + WebArticle article = 1; } message GetWebArticleBatchRequest { - repeated string ids = 1; + repeated string ids = 1; } message GetWebArticleBatchResponse { - repeated WebArticle articles = 1; + repeated WebArticle articles = 1; } message ListWebArticlesRequest { - string feed_id = 1; - int32 page_size = 2; - string page_token = 3; + string feed_id = 1; + int32 page_size = 2; + string page_token = 3; } - message ListWebArticlesResponse { - repeated WebArticle articles = 1; - string next_page_token = 2; - int32 total_size = 3; +message ListWebArticlesResponse { + repeated WebArticle articles = 1; + string next_page_token = 2; + int32 total_size = 3; } message GetRecentArticlesRequest { - int32 limit = 1; + int32 limit = 1; } message GetRecentArticlesResponse { - repeated WebArticle articles = 1; + repeated WebArticle articles = 1; } message GetWebFeedRequest { - oneof identifier { - string id = 1; - string url = 2; - } + oneof identifier { + string id = 1; + string url = 2; + } } message GetWebFeedResponse { - WebFeed feed = 1; + WebFeed feed = 1; } message ListWebFeedsRequest { - string publisher_id = 1; - int32 page_size = 2; - string page_token = 3; + string publisher_id = 1; + int32 page_size = 2; + string page_token = 3; } message ListWebFeedsResponse { - repeated WebFeed feeds = 1; - string next_page_token = 2; - int32 total_size = 3; + repeated WebFeed feeds = 1; + string next_page_token = 2; + int32 total_size = 3; } message ScrapeArticleRequest { - string url = 1; + string url = 1; } message ScrapeArticleResponse { - ScrapedArticle article = 1; + ScrapedArticle article = 1; } message GetLinkPreviewRequest { - string url = 1; - bool bypass_cache = 2; + string url = 1; + bool bypass_cache = 2; } message GetLinkPreviewResponse { - LinkEmbed preview = 1; + LinkEmbed preview = 1; } message InvalidateLinkPreviewCacheRequest { - string url = 1; + string url = 1; } message InvalidateLinkPreviewCacheResponse { - bool success = 1; + bool success = 1; } - service WebArticleService { - rpc GetWebArticle(GetWebArticleRequest) returns (GetWebArticleResponse); - rpc GetWebArticleBatch(GetWebArticleBatchRequest) returns (GetWebArticleBatchResponse); - rpc ListWebArticles(ListWebArticlesRequest) returns (ListWebArticlesResponse); - rpc GetRecentArticles(GetRecentArticlesRequest) returns (GetRecentArticlesResponse); +service WebArticleService { + rpc GetWebArticle(GetWebArticleRequest) returns (GetWebArticleResponse); + rpc GetWebArticleBatch(GetWebArticleBatchRequest) returns (GetWebArticleBatchResponse); + rpc ListWebArticles(ListWebArticlesRequest) returns (ListWebArticlesResponse); + rpc GetRecentArticles(GetRecentArticlesRequest) returns (GetRecentArticlesResponse); } service WebFeedService { - rpc GetWebFeed(GetWebFeedRequest) returns (GetWebFeedResponse); - rpc ListWebFeeds(ListWebFeedsRequest) returns (ListWebFeedsResponse); + rpc GetWebFeed(GetWebFeedRequest) returns (GetWebFeedResponse); + rpc ListWebFeeds(ListWebFeedsRequest) returns (ListWebFeedsResponse); } service WebReaderService { - rpc ScrapeArticle(ScrapeArticleRequest) returns (ScrapeArticleResponse); - rpc GetLinkPreview(GetLinkPreviewRequest) returns (GetLinkPreviewResponse); - rpc InvalidateLinkPreviewCache(InvalidateLinkPreviewCacheRequest) returns (InvalidateLinkPreviewCacheResponse); + rpc ScrapeArticle(ScrapeArticleRequest) returns (ScrapeArticleResponse); + rpc GetLinkPreview(GetLinkPreviewRequest) returns (GetLinkPreviewResponse); + rpc InvalidateLinkPreviewCache(InvalidateLinkPreviewCacheRequest) returns (InvalidateLinkPreviewCacheResponse); }