mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
82 lines
1.3 KiB
Protocol Buffer
82 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package rss;
|
|
|
|
option go_package = "./proto;rss";
|
|
|
|
service Rss {
|
|
rpc Add(AddRequest) returns (AddResponse) {}
|
|
rpc Remove(RemoveRequest) returns (RemoveResponse) {}
|
|
rpc Feed(FeedRequest) returns (FeedResponse) {}
|
|
rpc List(ListRequest) returns (ListResponse) {}
|
|
}
|
|
|
|
message Feed {
|
|
// unique id
|
|
string id = 1;
|
|
// rss feed name
|
|
// eg. a16z
|
|
string name = 2;
|
|
// rss feed url
|
|
// eg. http://a16z.com/feed/
|
|
string url = 3;
|
|
// category of the feed
|
|
string category = 4;
|
|
}
|
|
|
|
message Entry {
|
|
// unique id of the entry
|
|
string id = 1;
|
|
// the rss feed where it came from
|
|
string feed = 2;
|
|
// rss feed url of the entry
|
|
string link = 3;
|
|
// title of the entry
|
|
string title = 4;
|
|
// article summary
|
|
string summary = 5;
|
|
// article content
|
|
string content = 6;
|
|
// data of the entry
|
|
string date = 7;
|
|
}
|
|
|
|
message AddRequest {
|
|
// rss feed name
|
|
// eg. a16z
|
|
string name = 1;
|
|
// rss feed url
|
|
// eg. http://a16z.com/feed/
|
|
string url = 2;
|
|
// category to add
|
|
string category = 3;
|
|
}
|
|
|
|
message AddResponse {
|
|
}
|
|
|
|
message FeedRequest {
|
|
// rss feed name
|
|
string name = 1;
|
|
}
|
|
|
|
message FeedResponse {
|
|
repeated Entry entries = 1;
|
|
}
|
|
|
|
message ListRequest {}
|
|
|
|
message ListResponse {
|
|
repeated Feed feeds = 1;
|
|
}
|
|
|
|
message RemoveRequest {
|
|
// rss feed name
|
|
// eg. a16z
|
|
string name = 1;
|
|
}
|
|
|
|
message RemoveResponse {
|
|
}
|
|
|